Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Clearing, Without Unsightly Line Breaks?
Old 05-12-2008, 03:12 PM Clearing, Without Unsightly Line Breaks?
Average Talker

Posts: 28
Trades: 0
I am currently working on a site that has content and widgets displayed as a series of boxes. Each box has been designed and styled as a div, and looks/works perfectly. It results in stuff in this format:

Code:
<div class="content">
     <p>this content boxes stuff</p>
</div>
<div class="content">
     <p>different, semi-related content</p>
</div>

On occasion, the last thing in a content box will be floated (think along the lines of a "More" link that is floated right). If this is floated, it tends to jump out of the containing div. My current solution to this problem is a line break that clears the floats. So I'd have <br class="clear"> with the following in my CSS:
Code:
.clear {
    clear: both;
}
This eliminates the problem, but creates a line break where I don't necessarily want one. Does anyone have any simple solutions that I can use to meet both of these requirements?

Thanks,
Cory
Cory Dee is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-12-2008, 03:44 PM Re: Clearing, Without Unsightly Line Breaks?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Collapse the line-break space and it won't be noticeable:

.brclear {
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;

There's also the clearfix:after method:
http://css-discuss.incutio.com/?page=ClearingSpace
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-13-2008, 08:37 AM Re: Clearing, Without Unsightly Line Breaks?
Average Talker

Posts: 28
Trades: 0
Thanks, collapsing the size of the br seems to be working well.
Cory Dee is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Clearing, Without Unsightly Line Breaks?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11372 seconds with 12 queries