Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack (1) Thread Tools
Old June 15th, 2007, 07:48 AM   1 links from elsewhere to this Post. Click to view. #1
WebForumz Member
 

Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 cyberseed is on a distinguished road
Talking Fluid layout - IE6 clichés the layout when resizing

Hi I am working on a table-less fluid layout that is fairly simple but I noticed when you resize the window in IE6 by dragging the edge of the window it sometimes displays the layout of the divs wrong. This does not happen in FF. Any help, yes please!

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>margins and padding</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
  <div id="container">
    <div id="leftcontainer"></div>
    <div id="middlecontainer"></div>
    <div id="rightcontainer"></div>
  </div>
  <div id="content">Content for id "content" Goes Here</div>
</div>
</body>
</html>
css:

Code:
body {
 color: #000000;
 background-color: #FFFFFF;
 margin: 10px;
}
#wrap {
 width: 96%;
 background-color: #CCCCCC;
 margin-right: auto;
 margin-left: auto;
 height: 500px;
}
#leftcontainer {
 background-color: #666666;
 width: 30%;
 height: 80px;
 float: left;
}
#middlecontainer {
 background-color: #CCCCCC;
 width: 30%;
 height: 80px;
 float: left;
 margin-right: 5%;
 margin-left: 5%;
}
#rightcontainer {
 background-color: #666666;
 width: 30%;
 height: 80px;
 float: right;
}
#container {
 background-color: #FFFFFF;
 width: 100%;
 height: 80px;
}
#content {
 background-color: #666666;
 color: #FFFFFF;
 margin-top: 10px;
 margin-bottom: 10px;
}
cyberseed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 07:51 AM   #2
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Fluid layout - IE6 clichés the layout when resizing

I wonder if it's because you are using % for the widths. It might be worth trying em's or pixels.
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 07:54 AM   #3
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: Fluid layout - IE6 clichés the layout when resizing

Just found this http://css-discuss.incutio.com/?page=UsingPercent

Quote:
Note that you may experience problems in IE when using several percentages that add to 100%, probably due to rounding errors. For example, five images sized at 20% each may wrap onto a second line. If this happens, try setting a slightly smaller percentage (e.g. 19.9%) to make IE behave. You may wish to use a CssHack to hide this declaration from other browsers.
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 08:57 AM   #4
Highly Reputable Member
 

Join Date: Apr 2007
Location: Kent, England
Age: 39
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 VanessaJW will become famous soon enough
Re: Fluid layout - IE6 clichés the layout when resizing

Quote:
Originally Posted by Lchad View Post
I wonder if it's because you are using % for the widths. It might be worth trying em's or pixels.
I thought a fluid layout had to be in %, no? Can it still be fluid in pixels?
VanessaJW is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 09:22 AM   #5
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: Fluid layout - IE6 clichés the layout when resizing

Yeah, you're right, Vanessa: em and pixel are set widths (em isn't exact all of the time), but you need percentages for a fluid layout. You're also right, Linda. Whether it's a rounding error or something else, IE doesn't always display things correctly when it's not exact.

In my experience, if you tell a browser to split something 50/50 when the width 3 pixels, there will be an extra pixel of space in there. It depends on the circumstances, but this is just one of those things that you need figure out a per-case incident.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 09:33 AM   #6
WebForumz Member
 

Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 cyberseed is on a distinguished road
Re: Fluid layout - IE6 clichés the layout when resizing

[quote=Lchad;193940]Just found this

Thanks Lchad that seems to work. I changed the middlecontainer to 29.8% (didnt work at 29.9%).The only problem is that its not totally symmetrical now but at least it is cliche free. FF is so much better!

VanessaJW - a totally fluid layout can not be in pixels. You have to use % or ems. I am cheating and using pixel heights but % widths which makes life a little easier. For instance I have noticed that if you float divs within a parent div the parent div does not inherit the height of the child in FF but it does in IE6. Its all a bit tricky really especially if you want to validate to AA.

Last edited by cyberseed; June 15th, 2007 at 09:38 AM.. Reason: typo
cyberseed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 15th, 2007, 09:18 PM   #7
Most Reputable Member
 

Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice MikeHopley is just really nice
Re: Fluid layout - IE6 clichés the layout when resizing

Quote:
Originally Posted by VanessaJW View Post
I thought a fluid layout had to be in %, no? Can it still be fluid in pixels?
It depends what you mean by "fluid".

When you set a design in px, then it can't be adjusted. Technically, it's a relative unit -- but it's relative to the viewing device, which isn't that helpful (most people won't change their screen resolution just to resize your website).

When you set a design in %, then it resizes depending on the window size.

When you set a design in em, then it resizes with the font (my favourite: you control the proportions and line length, but the user can resize the whole page).

Exception: setting font-sizes in em or % is the same: 1em = 100%. But make sure you set your base font size (in *, html, or body) using % and not em, because IE has a freaky text-resizing bug if you use em.

You can combine these with max-width for some added flexibility in low resolutions (content compresses when squeezed, rather than getting a horizontal scrollbar).

Last edited by MikeHopley; June 15th, 2007 at 09:28 PM..
MikeHopley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old June 16th, 2007, 01:14 AM   #8
Highly Reputable Member
 

Join Date: Apr 2007
Location: Kent, England
Age: 39
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 VanessaJW will become famous soon enough
Re: Fluid layout - IE6 clichés the layout when resizing

Quote:
Originally Posted by MikeHopley View Post
Exception: setting font-sizes in em or % is the same: 1em = 100%. But make sure you set your base font size (in *, html, or body) using % and not em, because IE has a freaky text-resizing bug if you use em.
Thanks for the explanation Mike. I didn't realise you could actually set the font size in %, I thought you would always set the font in px or em, and it would just be your various widths that would be in %. I think I feel a bit more in control of things if I forget about fluid and just use px for everything; the display seems more certain that way. I can see the advantages though of % and em - I'll have to have a bit of a play with doing fluid layouts when I have time.

Last edited by VanessaJW; June 16th, 2007 at 01:15 AM.. Reason: Forgot to end quote
VanessaJW is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
fluid layout , ie6 clichs


LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/html-xhtml-and-css/42990-fluid-layout-ie6-clich-s-the.htm
Posted By For Type Date
Fluid layout - IE6 clichés the layout when resizing - bit.ly Statistics This thread Refback February 24th, 2009 06:33 PM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 layout problems FF + IE when resizing browserwindow tilto HTML, XHTML and CSS 0 March 17th, 2008 05:55 AM
where can I find a fluid 3 column layout Gerry HTML, XHTML and CSS 7 November 2nd, 2007 07:48 PM
New to CSS Layout tapster HTML, XHTML and CSS 15 October 15th, 2007 06:18 AM
new layout welshstew The Café 31 October 1st, 2007 12:56 PM
What makes a layout a good layout? Miles Lombardi Graphic Specifics 4 July 25th, 2005 11:22 PM


Search Engine Optimization by vBSEO 3.2.0 RC8