Previous Message
Next Message

Warnings on same color in different contexts and a clear semantic approach reason

Sent by Thierry Koblentz on 11 September 2009 23:11


> On 12/09/2009, at 8:23 AM, MEM wrote:
> 
> >> 1)
> >> I see a "non semantic approach" if I may call that, by using empty
> >> <p>
> >> tags to apply a clear property. Something like:
> >>
> >> <p class="clear" />
> >>
> >> And on the css have, something as:
> >> .clear
> >> {
> >> 	clear:both;
> >> }
> >>
> >>
> >> Is this technique valuable for some specific reason(s), or
> >> can we just apply "clear:both;" directly on the css paragraph parent
> >> element, instead of creating new empty html tags?
> 
> > Forget something important, sorry. :s
> >
> > The html:
> > http://www.nuvemk.com/rebelate/rebelatehome/home.html
> 
> The point of this is probably containing floats (google it). Normally
> an element like this is placed after floated content but inside the
> container that the developer wants to contain the floated content.
> 
> There are other ways of achieving this that don't require extra
> markup. The technique you use may depend on what else is happening on
> the page. Probably the simplest is setting 'overflow: auto'  or
> 'overflow: hidden' on the containing element. This won't work if you
> have content that extends beyond the container (with negative margins,
> positioning, width wider than container etc.). Other options include
> floating the container as well or using generated content and clearing
> that. IE doesn't understand this but it doesn't matter as IE contains
> floats anyway. 


IE does not contain float unless the container has a layout.


> Technique is as follows:
> 
> .clearfix:after {
> 	content: '.';
> 	display: block;
> 	height: 0;
> 	visibility: hidden;
> 	clear: both;
> }

Different methods are explained here:
http://www.tjkdesign.com/articles/clearing-floats_and_block-formatting_conte
xt.asp


-- 
Regards,
Thierry | http://www.TJKDesign.com





______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: