Forum Moderators: not2easy

Message Too Old, No Replies

Table in a Div

         

zao420

1:04 am on Feb 24, 2004 (gmt 0)

10+ Year Member



OK ia m giving up on a tableless forum. its imposible to get it to work cross-browser. anyway when i put a table inside a div it brakes in internet explorer..


/* i ahve nav bars on both sides of this.. */
.contentText { position:absolute;
top:5em;
left:8em;
right:8em;
z-index:2; }

/* this is what makes it brake in IE */
Table { border-collapse:collapse; Width:100%; }

/* here is the menu stuff */
.menu{ position : absolute;
top:5em;
left:0;
width:6em;
z-index:1;
padding:0;
background-color: #8D8989;
border-left:0; }

.menu{ padding:0.5em;
margin-bottom:0.5em; }

.menu a {display:block;}
.menu .delimiter {display:none;}

.FMenu { position:absolute;
top:5em;
right:0;
width:6em;
z-index:2;
padding:0;
background-color:#8D8989;
border-right:0; }

.FMenu{padding:0.5em;
margin-bottom:0.5em; }

.FMenu a {display:block;}
.FMenu .delimiter {display:none;}

the problem with setting the width of the div by a percent is its a different percent on different screen res.. and yea my css is not optimized yet so there are repeated stuff. anmyway how do i get this to work in ie

BlobFisk

4:29 pm on Feb 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi zao420,


the problem with setting the width of the div by a percent is its a different percent on different screen res..

Surely you mean is a physically different width on different screen resolutions? It's the same percentage, but just a percentage of a smalled available width?


/* this is what makes it brake in IE */
Table { border-collapse:collapse; Width:100%; }

Don't forget that CSS is case sensitive, so it should be table and width. You could also try making the table width auto instead of 100%.

HTH

zao420

3:05 am on Feb 25, 2004 (gmt 0)

10+ Year Member



didn't know it was case sensitive thanks for that info.. i will try auto i was just going to write a little bit of asp to check for internet explorer and screen res and set the width from there. but will try auto first but i think IE is setting it to the screen width instead of the table width..