473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

float left with block to right leaves gap in IE6

Hey all, I've got a little problem... I imagine it should be pretty common
though I could not find an answer via google.

What I'm after is a static left nav with a fluid main content to the right
that expands to fill the remaining browser window.

Take a look at this page in both FF and IE6:
http://www.roagie.com/layout.php

in FF: sections 3 and 4 are butted right up against each other
In IE: there is a noticeable gap between sections 3 and 4

If I assign float:left to section 4, it butts up nicely, but then it doesn't
auto-expand to the take the remaining browser width.

Any help GREATLY appreciated... I've been beating my head against the desk
for a day on this.

P.S. There is also another variation of this problem on that page... the
sections butt up, but the image & text is not flush against the left side as
it is with FF.
Oct 28 '07 #1
5 5008
Rumba wrote:
Hey all, I've got a little problem...
<http://www.positionise verything.net/explorer/threepxtest.htm l>

--
Gus
Oct 28 '07 #2
>Hey all, I've got a little problem...
>
<http://www.positionise verything.net/explorer/threepxtest.htm l>
It doesnt' seem to be the 3px issue because the two divs have heights
assigned to them.

Oct 28 '07 #3
In article <1P************ ******@newsfe06 .phx>,
"Roagie" <no*****@man.co mwrote:
Hey all, I've got a little problem...
<http://www.positionise verything.net/explorer/threepxtest.htm l>

It doesnt' seem to be the 3px issue because the two divs have heights
assigned to them.
I don't think this is a good reason to doubt it. You are perhaps
confusing it with another issue.

It is a pesky business assigning heights anyway in a real webpage
that has a left floating nav and right content. You will lose
flexibility.

There are a number of ways of tackling your problem. The simplest
and best is to stop worrying about the content butting up so
exactly. Give the left nav a width and the right (non-floated)
content div at least a left-margin as wide as the float. If you
design so it still looks nice with a bit more margin, then it
will not look so different in IE which does add the 3px gap.

But if you really insist on butting up, then one way to do it is
to tell IE that the the left margin to the static content is 3px
less than the width assigned to the float. And you can do this in
a number of ways, via a * hack in your css sheet, or a
conditional construction in your html that only IE notes. In the
case of the latter you can refer IE to a different stylesheet.

If you use a float, float construction (which is not for you
really because you want to let the content expand), there is a
way to cope with the gap in IE by giving the right float a neg
margin (for IE eyes only via css hacks or conditionals).

--
dorayme
Oct 28 '07 #4
There are a number of ways of tackling your problem. The simplest
and best is to stop worrying about the content butting up so
exactly.
It's a sliced up graphics kinda layout, so the images that serve as the div
background-images must butt up.
Give the left nav a width and the right (non-floated)
<helpful suggestions snipped>

Thanks for all your suggestions, but in the interest of cross-browser
compatibility and time I just created a skeleton using a table, and am using
css inside each table cell. To me it just didn't make sense to try all these
css hacks to get the browsers to agree... if you have to hack css so much
for complex layouts, then it's simply not ready for complex layouts (some
layouts may be ok, but for complex stuff like I'm trying to do... no dice).
I understand it's not css' fault, it's the browsers'. But it is what it is.
I solved my problem with a simple table layout in 1 minute, compared to the
3 hours I had already wasted trying to get it to work with divs, and
probably much more time had I attempted to slug it out with css hacks.

Oct 31 '07 #5
In article <1w************ *****@newsfe07. phx>,
"Roagie" <no*****@man.co mwrote:
There are a number of ways of tackling your problem. The simplest
and best is to stop worrying about the content butting up so
exactly.

It's a sliced up graphics kinda layout, so the images that serve as the div
background-images must butt up.
Give the left nav a width and the right (non-floated)
<helpful suggestions snipped>

Thanks for all your suggestions, but in the interest of cross-browser
compatibility and time I just created a skeleton using a table, and am using
css inside each table cell. To me it just didn't make sense to try all these
css hacks to get the browsers to agree... if you have to hack css so much
for complex layouts, then it's simply not ready for complex layouts (some
layouts may be ok, but for complex stuff like I'm trying to do... no dice).
I understand it's not css' fault, it's the browsers'. But it is what it is.
I solved my problem with a simple table layout in 1 minute, compared to the
3 hours I had already wasted trying to get it to work with divs, and
probably much more time had I attempted to slug it out with css hacks.
I understand and sympathise. Good luck.

--
dorayme
Oct 31 '07 #6

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

Similar topics

6
2805
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
1881
by: erikd | last post by:
I'm trying to set up a standard "footer" on my pages. I just discovered by reading this newsgroup that straight html is no good and I need to learn how to do it using css. So I while I'm learning css I took some code from a sample web page, but I don't think it's optimal. What I'm trying to achieve is a horizontal rule at the bottom of the page with a text block left aligned on the left and right aligned on the right. So there would be a...
0
1086
by: The Bicycling Guitarist | last post by:
The home page as currently online has my <h1> floated right, mainly so that text will be at the top of the xhtml code. I have an alternate version with everything floated left. Any opinions on which is better and why? Any suggestions for improvement in the coding? (I want the page's appearance to remain close to this layout, lol) current home page, div containing <h1> is floated right http://www.TheBicyclingGuitarist.net/ alternate...
0
2045
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).
5
6341
by: john_aspinall | last post by:
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
5
10153
by: OtisUsenet | last post by:
Hi, I'm killing myself trying to get a "horizontal nav bar" where some text is left aligned, and some is aligned to the right, kind of like this: LEFT RIGHT -------------------------------------------------------------- This is what I'm trying:
12
4492
by: Michael7 | last post by:
Hi Everyone, I've been trying to get two blocks of text to be aligned, one left, one right, on the same line. What I'm trying to mimic is what I did with tables here: http://www.workmenforChrist.org (under the "Site Map" link) I tried floating the blocks with the code: /*Right box on the index page*/
4
3750
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...
1
3727
by: Chinsu | last post by:
<html> <head> <style> #ex { width: 700px; background: red; float: left; } a, span { display: block;
0
8850
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
8746
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...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
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...
0
5649
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();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
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
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.