HighDots Forums  

Floated div problem in various browsers

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Floated div problem in various browsers in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zaka Ferenc
 
Posts: n/a

Default Floated div problem in various browsers - 08-19-2003 , 02:57 AM






Hi all,

the page http://info.etr.elte.hu/divtest5.html looks as I expected in
IE6 and Opera 7.11, but the floated divs float out of the containing
blocks (divs) in NN7.1 and Opera 7.0 (what I don't want).
Questions are:
1) IE & Opera7.11 or NN & Opera7.0 display correctly the page ?
2) If IE & Opera7.11 work well is there a workaround for NN & Opera7.0 ?
3) If NN & Opera7.0 are the correct ones how can I make this page to
look the same in all these browsers?

Thanks a lot!

zf


Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: Floated div problem in various browsers - 08-19-2003 , 04:22 AM






Zaka Ferenc wrote:

Quote:
Hi all,

the page http://info.etr.elte.hu/divtest5.html looks as I expected in
IE6 and Opera 7.11, but the floated divs float out of the containing
blocks (divs) in NN7.1 and Opera 7.0 (what I don't want).
Questions are:
1) IE & Opera7.11 or NN & Opera7.0 display correctly the page ?
2) If IE & Opera7.11 work well is there a workaround for NN & Opera7.0 ?
3) If NN & Opera7.0 are the correct ones how can I make this page to
look the same in all these browsers?

Thanks a lot!

zf

Add <br style="clear:both;"/> before
" </div>
</div>
</body>
</html> "

--
Els

A mente é egual á uma paraqueda; funciona melhor aberta.



Reply With Quote
  #3  
Old   
Stephen Poley
 
Posts: n/a

Default Re: Floated div problem in various browsers - 08-19-2003 , 04:40 AM



On Tue, 19 Aug 2003 09:57:52 +0200, Zaka Ferenc <zakaf (AT) freemail (DOT) hu>
wrote:

Quote:
the page http://info.etr.elte.hu/divtest5.html looks as I expected in
IE6 and Opera 7.11, but the floated divs float out of the containing
blocks (divs) in NN7.1 and Opera 7.0 (what I don't want).
Questions are:
1) IE & Opera7.11 or NN & Opera7.0 display correctly the page ?
2) If IE & Opera7.11 work well is there a workaround for NN & Opera7.0 ?
3) If NN & Opera7.0 are the correct ones how can I make this page to
look the same in all these browsers?
You need some form of non-floated content after the floated DIVs to make
the outer DIV extend below them. An empty DIV with a clear property
applied or something like that will do it. Some people here recommend a
HR with visibility: hidden and clear: both.

I'm surprised IE displays as you wanted because IME IE needs an actual
character after the floats (&nbsp; is an obvious candidate) - but as we
all know IE is not predictable.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Reply With Quote
  #4  
Old   
Stephen Poley
 
Posts: n/a

Default Re: Floated div problem in various browsers - 08-19-2003 , 06:44 AM



On Tue, 19 Aug 2003 11:22:30 +0200, Els
<els.aNOSPAM (AT) PLEASEtiscali (DOT) nl.invalid> wrote:

Quote:
Zaka Ferenc wrote:

Hi all,

the page http://info.etr.elte.hu/divtest5.html looks as I expected in
IE6 and Opera 7.11, but the floated divs float out of the containing
blocks (divs) in NN7.1 and Opera 7.0 (what I don't want).

Quote:
Add <br style="clear:both;"/> before

Although this does work in most/all browsers (and it seems sensible to
me that it does) it actually shouldn't according to the spec, as the CSS
spec states "This property may only be specified for block-level
elements". To be on the safe side with respect to future browser
versions, use HR or DIV or some other block-level element instead of BR.

Musing: what about <BR STYLE="display: block; clear: both;"> ?
I'm not sure about that one.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/


Reply With Quote
  #5  
Old   
Els
 
Posts: n/a

Default Re: Floated div problem in various browsers - 08-19-2003 , 07:55 AM



John W. wrote:

Quote:
Stephen Poley <sbpoley (AT) xs4all (DOT) nl>:

On Tue, 19 Aug 2003 11:22:30 +0200, Els wrote:

Add <br style="clear:both;"/

Although this does work in most/all browsers (and it seems sensible to
me that it does) it actually shouldn't according to the spec, as the CSS
spec states "This property may only be specified for block-level
elements". To be on the safe side with respect to future browser
versions, use HR or DIV or some other block-level element instead of BR.


p><br style="clear:both;"/></p
Does this make <br> a block-level element?

--
Els

A mente é egual á uma paraqueda; funciona melhor aberta.



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.