473,770 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why wont Firefox recognise my float:left?

http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.

Any help will be greatly appreciated! Ive added coloured borders to
try help with whats going on.

Cheers...John

Nov 29 '06 #1
5 6344
Nik
jo***********@y ahoo.co.uk wrote:
http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.
It sits perfectly next to the login box on my FF2/Win.

Where in relation to the #navigation do you wish the #content to be? I
see it directly underneath.

Nik
Nov 29 '06 #2
Els
Nik wrote:
jo***********@y ahoo.co.uk wrote:
>http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.
It sits perfectly next to the login box on my FF2/Win.
No, that's only part of the banner.
If you give the banner a left margin the width of the login box,
you'll see the full banner.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

Now playing: - Kristy Starling - As Long As We're Here
Nov 29 '06 #3
jo***********@y ahoo.co.uk wrote:
http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.

Any help will be greatly appreciated! Ive added coloured borders to
try help with whats going on.
A subtle detail of floating is that *blocks* don't wrap around floating
elements that precede them, *inline* content does. As you can see, the
word "banner" floats perfectly well. But the block that contains it
begins over at the left margin, and that's the correct behavior, since a
block can only be rectangular.

This becomes obvious if you replace the word "banner" with enough text
to extend below the bottom of the login block. The text will wrap, and
you'll see that for the banner block containing the text to be
rectangular, its left side has to be over at the left margin. If the
banner block's left side were to the right of the Login block, then the
text inside it couldn't wrap underneath the login block!

You have two choices:

1. Since your login block is a fixed pixel size, you could alter your
background image by adding 145 pixels of padding on the left. That empty
part of the graphic would--hmm, I *think*--sit *under* the floating
login block.

2. You can give the banner block a 145 pixel left margin, though if you
do that and you actually have enough text in it to extend below the
bottom of the login block, it won't wrap underneath the login block.
Nov 29 '06 #4

Harlan Messinger wrote:
jo***********@y ahoo.co.uk wrote:
http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.

Any help will be greatly appreciated! Ive added coloured borders to
try help with whats going on.

A subtle detail of floating is that *blocks* don't wrap around floating
elements that precede them, *inline* content does. As you can see, the
word "banner" floats perfectly well. But the block that contains it
begins over at the left margin, and that's the correct behavior, since a
block can only be rectangular.

This becomes obvious if you replace the word "banner" with enough text
to extend below the bottom of the login block. The text will wrap, and
you'll see that for the banner block containing the text to be
rectangular, its left side has to be over at the left margin. If the
banner block's left side were to the right of the Login block, then the
text inside it couldn't wrap underneath the login block!

You have two choices:

1. Since your login block is a fixed pixel size, you could alter your
background image by adding 145 pixels of padding on the left. That empty
part of the graphic would--hmm, I *think*--sit *under* the floating
login block.

2. You can give the banner block a 145 pixel left margin, though if you
do that and you actually have enough text in it to extend below the
bottom of the login block, it won't wrap underneath the login block.
OK I see what your saying and Ive added some text to the DIVS below and
it gets the effect you said it would:

http://www.ainewmedia.co.uk/test.htm

Although it does wrap in Firefox, but not IE, why is this? Also, you
mentioned an 'inline' block will work, i.e. poistion its 'block' next
to the floating block to its left. How would I do this for the content
block on my page?

Cheers...John

PS - I joined the banner graphic to login background graphic and now
all sits in one block, not elegant but it works!

Nov 29 '06 #5
jo***********@y ahoo.co.uk wrote:
Harlan Messinger wrote:
>jo***********@y ahoo.co.uk wrote:
>>http://www.ainewmedia.co.uk/test.htm

Im learning CSS based layout and Im pulling my hair out as to why wont
my banner DIV float to the right of my login box? It works fine in IE.

Any help will be greatly appreciated! Ive added coloured borders to
try help with whats going on.
A subtle detail of floating is that *blocks* don't wrap around floating
elements that precede them, *inline* content does. As you can see, the
word "banner" floats perfectly well. But the block that contains it
begins over at the left margin, and that's the correct behavior, since a
block can only be rectangular.

This becomes obvious if you replace the word "banner" with enough text
to extend below the bottom of the login block. The text will wrap, and
you'll see that for the banner block containing the text to be
rectangular, its left side has to be over at the left margin. If the
banner block's left side were to the right of the Login block, then the
text inside it couldn't wrap underneath the login block!

You have two choices:

1. Since your login block is a fixed pixel size, you could alter your
background image by adding 145 pixels of padding on the left. That empty
part of the graphic would--hmm, I *think*--sit *under* the floating
login block.

2. You can give the banner block a 145 pixel left margin, though if you
do that and you actually have enough text in it to extend below the
bottom of the login block, it won't wrap underneath the login block.

OK I see what your saying and Ive added some text to the DIVS below and
it gets the effect you said it would:

http://www.ainewmedia.co.uk/test.htm

Although it does wrap in Firefox, but not IE, why is this?
Because IE is wrong. I don't have IE7 yet--I wonder if this has been fixed.

I think you can solve the problem by putting the login block just inside
the banner block, even though that doesn't make sense in terms of the
page's structure.
Also, you
mentioned an 'inline' block will work, i.e. poistion its 'block' next
to the floating block to its left. How would I do this for the content
block on my page?
It *is* doing it. The text inside the block is inline content. The
text--the inline content--is wrapping (at least, in Firefox it is).
>
Cheers...John

PS - I joined the banner graphic to login background graphic and now
all sits in one block, not elegant but it works!
Nov 29 '06 #6

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

Similar topics

11
15031
by: Jeff Thies | last post by:
I have a series of blocks that are float left that I need centered on the page. <div class="center" align="center"> <div style="width: 100 px;float: left">thumbnail 1</div> <div style="width: 100 px;float: left">thumbnail 2</div> <div style="width: 100 px;float: left">thumbnail 3</div> </div>
6
3692
by: Herman Kuiper | last post by:
Hi, The HTML at the end of this message will render erroneously on IE (at least 5.0) and prperly on Mozilla (as I've been told). That does not surprise me, but I *would* like to find some workaround to get it to display properly... The thing is: on IE5 (Windows) the second "hello" is just not rendered (ok, at least I try to select all text with Ctrl-A...) when the empty <style> element is in the document. If I remove that element, it...
6
2807
by: TJ | last post by:
I've got a calendar that is based on the concept of lots of blocks that are spans with float:left. I would like to be able to have a detail section on the right side of the screen, so that when the user selects an item on the calendar, the detail can get displayed on the right side there. What I have below appears to look perfect in mozilla based browsers - the detail is aligned at the top right corner of the calendar, but in IE the...
4
2874
by: Chris Sharman | last post by:
I've a very simple page (intranet, but moved to http://services.ccagroup.co.uk/dtest.html for you - so the links are all broken). essentially it's just a list of links. I've split it into two columns with a floated left div, and therein lie the problems. It's valid 4.01 strict, but none of ie, moz, or ff correctly offset the
0
2052
by: jonipony | last post by:
HELP: Float Left box is drifting to the right in ie! -------------------------- I need som HELP with my CSS coding! On the following web page my design falls apart at screen size 800 x 600 (looks fine at larger screen sizes) when the left menu box that should float left is drifting to the right in Internet Explorer 6.0 (it doesn't drift to the right in Netscape 7.1).
0
1186
by: vytas | last post by:
hi, I've just ran into very strange IE behaviour. I have a table with some content: <table width="200" border="1"> <tr> <td width="50%"> <div class="bord" style="float: left">asdasdsdasdasdasd1</div> <div class="bord" style="float: left">asdasd</div> </td>
4
3754
by: erikirl | last post by:
http://www.hardwareforfree.com/ I'm trying to get the Consumer Gift Network image to be in the top right corner of the 800px area in the header. I have searched for hours and tried a lot of different things but it's still not working for me. I'm not very experienced so I'm sure it's something simple that I'm missing. Please look at the code below and tell me what I need to change. ==============HEADER.TPL=================== <div...
5
3372
by: Gozil | last post by:
Hey, Is it possible to change line on a float object? For example let say I have one <b> tag, one <p> tag and one <img> tag: I want the <img> to have float right and the <b> to have float left then I want the <p> to have float none so it will go around the image. However if I have float left on the <b> tag the <p> will stay on the same line as <b> and the only way I know how to move it down is by giving the <b> tag a width on 100% see...
15
16614
dlite922
by: dlite922 | last post by:
I'm back again, Intro: I've got a floating div (outerDIV) with fixed width that contains an image (IMG) and a div that contains a short text (innerDIV) Problem: In FF, the innerDIV is displaying under the IMG because outerDIV is not wide enough to contain both of them (in some instances). In the instances where the outerDIV is wide, I don't have this problem. IE wraps the text but still keeps it to the right of the IMG. FF doesn't...
13
7938
by: limelites | last post by:
In IE7, FF, Chrome and Safari, everything looks great but in Opera the display of the additional images in my product page looks awful. This is a site that does attract foreign visitors who do use Opera, so it does matter. Opera Version 9.64 Platform Vista Zen Cart 1.3.8a Site URL is www.limelites.co.uk
0
9432
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
10232
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
10059
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
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
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
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
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
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
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.