...

View Full Version : Weird Padding issue in FireFox



Navi Links
04-24-2006, 05:36 AM
On the quest of trying to do this myself, I've ran into a small problem. For some reason, there is padding showing up beneath my right sidebar block, when I specifically set it to 0. Really weird, because it shows perfectly when viewed in IE6 and IE7. Here is what I use in CSS:


#sidebar {
position:relative;
float:right;
width:340px;
}

.block {
width:340;
position:relative;
background-color:#FFF;
margin-bottom:10px;
padding:0px 0 0px 0;
}

url referring to is :here (http://www.ntronics.com)

Thanks in advance for a solution to this matter.

Kravvitz
04-24-2006, 07:50 AM
Read these:
http://garyblue.port5.com/webdev/object-gap.html
http://developer.mozilla.org/en/docs/Images,_Tables,_and_Mysterious_Gaps

Please fix your XHTML (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.ntronics.com%2F) and CSS (http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=0&uri=http%3A%2F%2Fwww.ntronics.com%2F) erorrs.

Four ways to Center Elements with CSS (in IE5+/Win and other browsers) (http://www.dynamicsitesolutions.com/css/center_element/)

Navi Links
04-24-2006, 09:18 AM
Ok the documents you refer me to suggests that I should try using

tr.decoration img {display: block;}

or


td img {vertical-align: bottom;}

But, where exactly am I adding these, because adding either of them within my CSS file does nothing.

Sorry, probably brain overload or something. I just can't seem to get it.

this is my sidebar.php file:


<div id="sidebar">

<div class="block">

<center><a href="http://click.linksynergy.com/fs-bin/click?id=3MRWSgDAgJE&offerid=95795.10000107&type=4&subid=0"><IMG
alt="400GB Triple Interface Hard Drive 340x283" border="0" src="http://www.ntronics.com/media/iomega2.jpg"></a></center>

</div>

</div>

Kravvitz
04-24-2006, 09:32 AM
Those won't work because the <img> isn't in a table-cell (<td>). You need to change the selector chain to match your XHTML code.

This is what you want.

#sidebar img {
display: block;
}

Navi Links
04-24-2006, 03:42 PM
Kravvitz, I pray the day I become a genius like you. In the mean while, I am glad a genius like you, is here to help. Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum