float:right difference between IE and mozilla

T

toylet

I want a big title bar with a navigation bar beneath it, floated right.
But float:right under IE6 appended a <BR> after the floated text. How
could I get around it?

http://toylet.homeip.net/~toylet/test.html

I also attached the small html file. Notice the lower right corner of
the box, as displayed under mozilla and IE6.


--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
^ ^ 11:36am up 16:42 1 user 0.94 0.95


<html><head>
<style type="text/css">
#top {
border:1px solid;
position:absolute;
top:5px;
left:5px;
width:99%;
height:100px;
}
/*
under IE, a <br> was appended autmatically after floated text.
under mozilla, no <br> was dispalyed after the floated text.
*/
#top .bar {
float:right;
}
</style>
</head><body>
<div id="top">
<h1>TOP BAR</h1>
<div class="bar">
floated-text
</div>
</div>
</body></html>
 
M

Mark Parnell

I tried, but didn't help. Why does IE append a <BR>?

It doesn't. Can you see a <br> in the source? I can't.

It seems to be something to do with the absolute positioning. Why not
show us what you are really trying to do (i.e. on a real page)? That
will make it easier to suggest solutions/alternatives.
Is there an alternative way to specify float:right?

Depends what you are really trying to achieve. See above.
I meant the html codes, not the image of the webpage.

An attachment _is_ a binary file. Text-only is the order of the day
here.
 
T

toylet

I tried said:
It doesn't. Can you see a <br> in the source? I can't.

It's an invisible one. I should have been more specific.
It seems to be something to do with the absolute positioning. Why not
show us what you are really trying to do (i.e. on a real page)? That
will make it easier to suggest solutions/alternatives.

I want to use CSS to render a box like this:

+------------------------------------------------------+
| BIG HEADING TEXT |
| menu1 | menu2 | menu3 |
+------------------------------------------------------+

I used two <div>, one <topbar> for the "BIG HEADING", and one <barmnu>
for the 3 menu. <barmnu> floats right. ON mozilla, the page was
disaplayed properly. On IE6 said:
An attachment _is_ a binary file. Text-only is the order of the day
here.

I just attached a text file, not a binary.
 
M

Mark Parnell

It's an invisible one. I should have been more specific.

My point is that it is not actually a line break.
I want to use CSS to render a box like this:

+------------------------------------------------------+
| BIG HEADING TEXT |
| menu1 | menu2 | menu3 |
+------------------------------------------------------+

I used two <div>, one <topbar> for the "BIG HEADING", and one <barmnu>
for the 3 menu. <barmnu> floats right. ON mozilla, the page was
disaplayed properly. On IE6, an invisible <BR> was appended after menu3.

Something like this?
http://www.clarkecomputers.com.au/usenet/test.asp
I just attached a text file, not a binary.

But it was still an attachment.
 
T

Toby A Inkster

toylet said:
Textual attachment makes no harm.

It does. Any form of MIME attachment requires a MIME compliant newsreader.
Many newsreaders do not support MIME. If you attach things to posts,
people using these clients will see various ugly gubbins in your post,
such as:

This is a multi-part message in MIME format.
--------------050402000800030208060300
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Luckily in this case, Mozilla chose to use 7bit for the message and
attachment, so the damage wasn't too bad, but had it used, say, base64,
things would have been a whole lot worse and your whole message may have
been unreadable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top