...

View Full Version : cellpadding/cellspacing issues with FF2 and IE7



crmpicco
02-17-2008, 09:58 PM
I have been struggling with a HTML issue with the following page between what is shown in FF 2 and IE 7.

Firefox 2 shows the page perfect, however IE 7 shows it with a space between the tabs at the top and the main table. I've removed the cellpadding/spacing from the main table, but it's still there. Any ideas?

http://www.ayrshireminis.com/index2.php

This is my code:


<table align="center" style="width: 80&#37;; background-color: #FFFFFF;" bgcolor="FFFFFF"><!--cellpadding="5" cellspacing="5"-->
<tbody>
<tr>
<td width="100%">
<table style="width: 100%;" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="1" cellspacing="0" width="100%" id="main-box"><!-- style="background-color: #FFFFB1;" -->
<tr>
<td width="100%">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td><h1>Welcome to AyrshireMinis.com</h1></td>
</tr>

.......



CSS for tabs:



#main {
width: 62em;
position: absolute;
top: 65px;
left: 65%;
margin-left: -31em;
padding: 0;
}
#main-box {
clear: left;
margin: 0;
padding: 1em;
background: #ffc33e url(/images/main-box-bg.gif) top left repeat-x;
border-top: 1px solid #fff;
}

Any help appreciated.

Picco
:(

jcdevelopment
02-17-2008, 11:05 PM
try adding this to your css



* {
padding:0px;
margin:0px;
}




that should work, hopefully, maybe!!

crmpicco
02-17-2008, 11:24 PM
WOW! Is that valid CSS? I'll give that a try.....

jcdevelopment
02-17-2008, 11:25 PM
yeah, it should be, i use it all the time!!

crmpicco
02-17-2008, 11:26 PM
no, that didn't work...... in FF it moved the entire table over to the LHS on the screen and the tabs came blow the level of the table.

:-(

Picco

jcdevelopment
02-17-2008, 11:32 PM
td {
margin:0px;
padding:0px;
}


try that, im not sure but once in you may have to mess with some padding and margins!
hope it works!!

maxvee8
02-17-2008, 11:50 PM
maybe put a height on what ever your tabs are in, table row / div

outseeker
02-18-2008, 12:07 AM
It's not a big deal, but how come you're using 2 style sheets in the one document? I don't suppose both css files are trying to control a certain attribute, and each browser displays that differently? Like FF uses first instance of styling and IE uses the last?

You could try making the page "elastic" by measuring in "em's" instead of "px's" like they teach you here:
http://jontangerine.com/log/2007/09/the-incredible-em-and-elastic-layouts-with-css

I hope this is of some help to you chief.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum