Hello, please could you help me, I am having a problem.
I have a web page layout which has in the middle a DIV with the following details:
.content { color: #4179a8; line-height: 1.4em; margin: 5px 145px 5px 145px; min-width: 90px; padding: 5px 5px 5px 5px; border: 1px solid #000000; border-top: 1px solid #000000; background-color: #eeeeff; position: relative; width: auto; z-index: 3; }
In the <div class="content"></div>
tags, I want to place a table that will fill the width of the DIV.
In the HTML:
<table class='fitted'> <tr> <td> Hello </td> </tr> </table>
In the CSS:
table.fitted { width:100%; }
When I try this, the table that is within the DIV expands to fill 100% of the screen width, I do not want this, I want the table to fill only the width of the DIV (which is always the width of the browser window minus a certain number of pixels. As people use their browsers at different widths, I need a way to force the table to only occupy the width of the DIV.
I hope you can help, many thanks.
TABLE of width 100% to fill a DIV
don't give any css properties to the table. Just leave the table without a width and it should figure it out.
TABLE of width 100% to fill a DIV
Problem here is different browsers render unspecified tables differently. And they also render specified tables differently!
For example Moz1 makes tables as small as possible if you don't give a width. But if you give a decent width (100% say) earlier versions of IE will do what I think is described above.
Any way of removing the table itself? I've got a similar problem, am currently ignoring it but also thinking of how I can change the site layout to remove the tables. Not easy, is all I can come up with!
TABLE of width 100% to fill a DIV
try to change your content div's width from "auto" to a specific width in pixel, let's say 100px and see what happens.
I've come across this some time ago and apparently, div's or any filling container need a precise width or height to be relative upon ( does that make sense? damn language barrier heh )
For example Moz1 makes
For example Moz1 makes tables as small as possible if you don't give a width. But if you give a decent width (100% say) earlier versions of IE will do what I think is described above.
радиолюбитель транзистор Ford Mondeo kia sorento шпаргалки рефераты українські реферати курсові роботи seropol4s
Any way of removing the table itself? I've got a similar problem, am currently ignoring it Eye-wink but also thinking of how I can change the site layout to remove the tables. Not easy, is all I can come up with!