homepage Welcome to WebmasterWorld Guest from 54.237.99.131
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Spacing problem in div
Spacing problem in div
mana

10+ Year Member



 
Msg#: 3837 posted 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

10+ Year Member



 
Msg#: 3837 posted 6:28 pm on Jun 9, 2004 (gmt 0)

font-size: 0;

in the divright selector

mana

10+ Year Member



 
Msg#: 3837 posted 6:35 pm on Jun 9, 2004 (gmt 0)

Thank you so much. That worked perfectly.

photon

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3837 posted 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