473,837 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Floated div problem in various browsers

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

Jul 20 '05 #1
6 2571
Els
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).
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:bo th;"/> before
" </div>
</div>
</body>
</html> "

--
Els

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

Jul 20 '05 #2
On Tue, 19 Aug 2003 09:57:52 +0200, Zaka Ferenc <za***@freemail .hu>
wrote:
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/
Jul 20 '05 #3
On Tue, 19 Aug 2003 11:22:30 +0200, Els
<el*********@PL EASEtiscali.nl. invalid> wrote:
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).

Add <br style="clear:bo th;"/> 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/
Jul 20 '05 #4
Stephen Poley <sb*****@xs4all .nl>:
On Tue, 19 Aug 2003 11:22:30 +0200, Els
<el*********@P LEASEtiscali.nl .invalid> wrote:
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).

Add <br style="clear:bo th;"/> 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.

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


John OO
--

<http://webcel.nl/>
<http://www.webcel.nl/bayshop/shop/bayshop.html>

"Time is what prevents everything from happening at once"
- John Archibald Wheeler -
Jul 20 '05 #5
Els
John W. wrote:
Stephen Poley <sb*****@xs4all .nl>:
On Tue, 19 Aug 2003 11:22:30 +0200, Els wrote:
Add <br style="clear:bo th;"/>


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:bo th;"/></p>


Does this make <br> a block-level element?

--
Els

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

Jul 20 '05 #6
Els <el*********@PL EASEtiscali.nl. invalid>:
John W. wrote:
Stephen Poley <sb*****@xs4all .nl>:
On Tue, 19 Aug 2003 11:22:30 +0200, Els wrote:

Add <br style="clear:bo th;"/>

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:bo th;"/></p>


Does this make <br> a block-level element?


http://www.w3.org/TR/html4/struct/gl...dx-block-level
+
http://www.webcel.nl/html/tables/block.html (Dutch)
John OO
--

<http://webcel.nl/>
<http://www.webcel.nl/bayshop/shop/bayshop.html>

"Time is what prevents everything from happening at once"
- John Archibald Wheeler -
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8283
by: boclair | last post by:
Is this a known problem with IE6? I have a provisional two column layout, the left menu column is positioned absolute. The contents column is positioned relative. The contents column has an image floated right. The placement is there in IE6 but not the image. It does not matter whether the DTD is strict or transitional
26
3782
by: puzzled | last post by:
Okay, so my subject sounds a bit crass. As much as I'd like to totally embrace css and avoid "deprecated" usage, sometimes the deprecated stuff is so much easier and more effective. Plus, it at least does what I want it to, while I'm left puzzled trying to make a css implementation do the same thing. Here is a simple example. I want to have four identical-sized images displayed in a two-by-two arrangement, wtih room for a centered...
2
2778
by: Wiz | last post by:
Greetings the group! I see from a few previous postings that I am not the only person having a problem with hidden list item bullets. This question applies to both IE 6, current version, and Firefox 0.8 browsers, which I am using for testing. I have a design in progress that uses a relatively positioned, left-floated, 122px wide navbar, with the main content padded to the right by 10px, wrapping under after it exceeds the height of the...
12
2055
by: The Master | last post by:
>>does a floated element require a fixed width to work? >It does if the UA adheres to CSS 2.0 rules, not if it adheres to CSS 2.1 >float rules (or if it's IE). So does that mean nn6, moz1.0, moz1.4, Firefox, Opera (versions 4 to 6), and Safari 1.2 and IE have all implimented CSS 2 Float rules wrong? and the first one to get it right is Opera 7.5? Or is that the reason it was changed in CSS 2.1 because so many
2
2387
by: Ray Shah | last post by:
I have this seemingly simple problem that has proven somewhat harder to solve than I'd expected. I've been grappling with this for quite a while, so any help would be greatly appreciated. Please have a look: http://www.thinkdesign.com/amrev-css2/ I have 2 html pages and the stylesheet linked from there.
24
2893
by: Thomas Mlynarczyk | last post by:
Hi, Here's what I have: <div> <img ...><br> Caption text </div> The div is floated left and has no width set, the content is centered, there are no margins or padding on the <img> (just a bottom margin and
4
9543
by: Matt | last post by:
Hi, Got an unordered list with 100% width, with 5 list items of 20% width styled to fill the width of the container element. Renders fine in Mozilla, but when you change the size of the window in IE, the last item in the list has a nasty tendency to wrap down to the next line (and stay there). I can hack it (imperfectly) by setting the width of the list items to
2
5714
by: sylvian stone | last post by:
Hi, I'm trying to do something that has always been easy with tables - namely use a three column layout, and above the main layout, show three images - one on the absolute left, one on the absolute right, and one in the middle. The one in the middle needs to be centered, as various browsers display slightly differently. However, using the CSS and code below, either the first image is not shown (IE) or the right image is shown below...
4
2907
by: sweep | last post by:
Hi there, I have a problem with some CSS I'm writing and I was looking for a little help. I have a nav bar at the top and left side of my page in CSS which work fine. The remaining space has a div which I'm using for body text. Floated to the right of this are two image boxes and a broken out quotation from the page (this box is wider than the images). The layout is working, except that the text in the main section doesn't seem to wrap...
0
9843
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10875
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10566
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10272
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7001
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3124
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.