homepage Welcome to WebmasterWorld Guest from 23.20.44.136
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Spacing problem in div
Spacing problem in div
mana




msg:1218227
 6:16 pm on Jun 9, 2004 (gmt 0)


I keep getting a space beneath any graphic in a div. I've stripped down my code and this is what I have:

<div class="divright"><img border="0" src="images/icon.jpg" />
</div>

The stylesheet contains the following:

.divright {display: block;float: right;
background-color : red; }

Very simple but I keep getting a red color beneath the graphic. I tried adding heights and <br />'s
but nothing seems to work.

Thanks so much

 

SethCall




msg:1218228
 6:28 pm on Jun 9, 2004 (gmt 0)

font-size: 0;

in the divright selector

mana




msg:1218229
 6:35 pm on Jun 9, 2004 (gmt 0)

Thank you so much. That worked perfectly.

photon




msg:1218230
 12:34 pm on Jun 10, 2004 (gmt 0)

Message #3 by tedster in the thread below explains why this is happening:

[webmasterworld.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved