473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

div and table problem

I have a style sheet containing the following definitions:

Expand|Select|Wrap|Line Numbers
  1. #leftcontent {
  2. position: absolute;
  3. left:20px;
  4. top:60px;
  5. width:180px;
  6. border:1px solid #000;
  7. padding-top: 15px;
  8. }
  9.  
  10. #centrecontent {
  11. margin-left: 200px;
  12. margin-right: 200px;
  13. border:1px solid #000;
  14. padding-top: 15px;
  15. }
  16.  
  17. #rightcontent {
  18. position: absolute;
  19. right:20px;
  20. top:60px;
  21. width:180px;
  22. border:1px solid #000;
  23. }
and inside <div id="centrecontent"> I have <table width=100%>, which I hoped
would produce a table the width of just the centre section. However, in
Internet Explorer the table is the full width of the page, which then goes
off the side of the window since it is already indented about 200 px. In
any other browser I have tried the table width is correct. Can someone
please tell me what is wrong? Thanks.
May 17 '10 #1
2 1331
drhowarddrfine
7,435 Expert 4TB
Setting something to 100% means 100% of the containing parent element. If the body is the containing element, and it is the full width of the page, then so is the table.
May 17 '10 #2
@haripadadas
a suggestion: you could edit your CSS to something like:

Expand|Select|Wrap|Line Numbers
  1. #centrecontent table{
  2. margin-right:200px;
  3. margin-left:200px;
  4. width:100%;
  5. }
  6.  
and that would allow you to remove the width declaration from your HTML.

Sometimes IE has a buggy display; but other times IE is just very literal in its interpretation of instructions. Some of the other browsers are more gentle in their renderings.

Best of luck!
May 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andrew | last post by:
I have a problem creating mySQL tables with PHP. I am making an app where a user can create a project. Pressing "submit" on proj_form.php goes to proj_add.php where a couple of things happen. ...
6
by: Murtix Van Basten | last post by:
HI all, I am trying to migrate a database from mysql to mssql2k. I use myODBC to connect to mysql server to pull the database from DTS and insert in to sql server. But in mysql server, there is...
4
by: Not Me | last post by:
Hi, I have a stored procedure, that works perfectly when run from the query analyser, however if I run it through access vba, (using exec) I get a runtime error 208: invalid object name...
6
by: Nutshell | last post by:
Hi, I created a web page which contains table. I use table cells to display a picture using <img src>. The problem is that some pictures are not being fully displayed, only a quarter of the left...
1
by: Kleist | last post by:
Hi! The XML document is created dynamically. I need to convert it in PDF format. Actually, this is a huge table with data. I don`t know in advance, how much columns it will have. I apply XSL-FO...
7
by: David Findlay | last post by:
I'm trying to do a table for laying out a links page in CSS. See http://qldstorms.com/links.php. My stylesheet is at http://qldstorms.com/styles/screen.css. My problem is that if the link name in...
0
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta...
3
by: mylog | last post by:
hi, I have a problem regarding the retrieval of data from a table. Here's is what I am doing. I have a created a table and from added the rows and columns and also data dynamically from the code...
3
dmjpro
by: dmjpro | last post by:
I think iText commonly used to create or manipulate PDF document in Java. So finally i decided to throw a question over here. For two days i am struggling. I encountered two types of table .....
3
by: josephamarks | last post by:
I am trying to correct a table problem. In IE6, the table (created in VS with ASPX) does display correctly. Ijn IE8, it adds unwanted horizontal scrollbars, and the columns do not display...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.