IE CSS Alignment / Site Help Please

I am making changes to a site that I did not create and running into some issues with the CSS. I know this is often an issue, but I am having difficulty getting the site to display correctly in IE on Windows platform. I could use some assistance and another (fresh) pair of eyes to help me see how to correct things. Can someone help please?

Mac + Firefox - looks ok
Mac + Safari - looks ok
Windows + Firefox - looks ok
Windows + IE - not displaying as it should

Home Page

  • The red box top left is too high and into the blue band at top.
  • The area to the right of that with six images and text is into the blue band and has a white line running between the top and bottom row of images.
  • There should be a white line between the blue band and the two areas below it.
  • The image HOT DEALS is displaying too low. The top of it should be level with the top line of text.
  • the AHLA logo, bottom right, should be in line with the FB, twitter, Wordpress text/imgs

Secondary Pages - Left Columns

  • An orange band (like the ones behind the text Select a State, etc.) is displaying behind the six packages, (Attractions, Golf, etc.) In a different place if you are displaying search results or About Us or another page.

I have screen shots if you are unable to see what I have described.

Any assistance is appreciated! Thank you.

Header-you set a pixel height and you should remove that height, and set overflow:hidden; instead :slight_smile:

And…I don’t see anything else?

What puzzles me is that it to me looks the same in FF and IE on WinXP, can’t see much difference. But then I’m late here. :slight_smile:

  • The left and right boxes are into the blue stripe.
  • There should be a white line between the blue band and the two areas below it. :
    Because the blue stripe background is 120px and the header total is only 106px to push the boxes down so there is the difference, the same in FF and IE (and should be in Mac too). Increasing the header height would solve the issues.

#header {
[COLOR="Red"]height:105px;[/COLOR] /* levels with the blue background height */
padding:10px 0 5px 0;
  • The image HOT DEALS is displaying too low. The top of it should be level with the top line of text.
    A top padding on its container, the “hotdeals2”, would align it with the text, e.g. 23px. It is now floated in level with the h4 heading.

  • the AHLA logo, bottom right, should be in line with the FB, twitter, Wordpress text/imgs.
    By the top padding on “socmedia” it seems you want them all vertical centre aligned, and they seems to be. To align bottom you could change that padding.

  • An orange band (like the ones behind the text Select a State, etc.) is displaying behind the six packages,
    The only orange band I can see is the background image applied to the box?

Thanks for these. I’ll take a look. I am viewing in Windows 2000. Would that make a difference? Also, can post screen shots or put them somewhere to view if that would help to see what I am seeing.

I was puzzled by you saying it was ok in FF and didn’t bother IE6 until you say it is the culprit. :slight_smile:

Is it IE6 you refer the other issues to?

Not sure of the version of IE - will check. I am on a Mac. No PC temporarily so am viewing on someone else’s system.

Still new to the forum. Can you advise what is the acceptable way to post images?

Putting the screenshots online and link to them is the fastest. Posting them here, they need to be approved first.

Thanks Erik. I have put up a quick page here - hope this works:

Apparently the problem is occurring in IE6.

IE 7 and 8 are apparently displaying as desired.

Hi, you just need to constrain the parent to its’ set height :slight_smile:

.home_sec_lastt, .home_sect{overflow:hidden;}

Wouldn’t the module be the parent?

<div class=“home_right_column1”>
<div class=“module module1home”>

	&lt;div class="home_sect"&gt;    /* This is the top row of 3 imgs text */
	&lt;a href="/packages/index/Attractions" class="attractions3"&gt;Attractions&lt;/a&gt;
            &lt;div class="home_sect"&gt;
	&lt;a href="/packages/index/HealthSpa" class="healthspa2"&gt;Health Spa&lt;/a&gt;
	&lt;div class="home_sec_lastt"&gt;
	&lt;a href="/packages/index/Romance" class="romance1"&gt;Romance&lt;/a&gt;

        &lt;div class="home_secb"&gt;    /* This is the bottom row of 3 imgs text  */
	&lt;a href="/packages/index/Gourmet" class="gourmet6"&gt;Gourmet&lt;/a&gt;
             &lt;div class="home_secb"&gt;
	&lt;a href="/packages/index/Outdoor" class="outdoor5"&gt;Outdoor&lt;/a&gt;
	&lt;div class="home_sec_lastb"&gt;
	&lt;a href="/packages/index/Golf" class="golf4"&gt;Golf&lt;/a&gt;
	&lt;div class="clear"&gt;&lt;/div&gt;

I meant the parent of the anchors lol :). My code works if you try it.

Well, I no longer have the white line between the images, but all of the other issues are still there.

I changed the header height to 105px and on Windows 2000, IE6 all the elements described above are still in the wrong place. The elements below the blue bar are still in the blue bar.

Thanks for the help, just not sure what to do at this point. Frustrating.

I said to remove the header height and set overflow:hidden; (also addd zoom:1; to be safe)

Did you not read my first post?

I did. Thanks for you suggestions. Two people posted different solutions.

Are you viewing is IE6 and can you see all of the issues I have described?

I’m testing now on not the live server.

Still learning, clearly…lol

That link returns a 404?

Changed the .header to what you suggested and no change - on Win2000, IE 6 still up into the blue band at the top.

Hi, IE is actually correct with this. The boxes below the header shouldn’t actually be that far down, however because hte Content is collapsed in height the floated elements are pushing up on the header.

You can make FF behave like IE in this example by giving it overflow:hidden;. zoom:1; wouldn’t hurt here either (gives IE6 haslayout which can’t hurt here)

Then just give a top margin to whatever value looks nice


I looked at your “sandbox”-link. You have a few IE bugs in your css and a few other issues. :slight_smile:

The space the content had below the header in good browsers was caused by a 20px collapsing margin, but IE does not collaps margins when the box has hasLayout.

This changes should fix all issues I think. Explaining comments added. :slight_smile:

#leaderad {
	margin:20px 0;
	float:left; /* for IE to respect the bottom margin on the child */
	width:100&#37;; /* avoid the float shrink wrapping the content */
	display:inline; /* Double-Floated-Margin bugfix IE6 */
#leaderboard {
	margin: 5px 0 5px 40px; /* bottom margin 5px not resp replaced when parent is not floated */
#header {
	height:105px; /* height plus padding now matches the 120px blue stripe background, (was 91px) */
	padding:10px 0 5px 0;
#content {
	padding:5px 25px 25px 25px; /* 5px top padding (0px) to restore the space that was caused by the collapsing 20px margin in good browsers */
	height:1%; /* clear floated content in IE6 (works by giving the box hasLayout, also in IE7) */
	overflow:hidden; /* avoid collapsing margins and clear floated content in good browsers (also trips hasLayout in IE7) */
#getaway {
	padding:0 0 0 3px;
	height: auto;
	overflow:hidden; /* for IE6 to respact the set width */
#hotdeals2 {
	margin:0px 0 0 15px;
	overflow:hidden; /* for IE6 to respact the set width */
.module1home div{
	overflow:hidden; /* for IE6 to respact the set height */
#ahla {
	margin:0 110px 0 0;
	display:inline; /* Double-Floated-Margin bugfix IE6 */
.socmedia {
	width: 430px;
	height: 35px;
	padding: 20px 0 0 0px;
	font-family:Arial, Helvetica, sans-serif;
	margin:0 0 0 100px;
	display:inline;/* Double-Floated-Margin bugfix IE6 */

Your start and end comments in the source comes between floats and causes the Duplicate Characters Bug in IE6 resulting in some extra vertical space. There are fixes, but I suggest you indent the code consistently, making the tag comments redundant.

The float drop is caused by the erroneous extra end tag ,interrupting the content div.

	<div class="left_column home2">
		<div class="lcoltop">
			<div id="getaway">
				<a href="/widepages/headlines" title="Getaway Vacation Headlines"><h4>Getaway Headlines</h4></a><br><br>
					<li><a href="/2010/01/04/drive-to-hawaii-really/">Drive to Hawaii REALLY</a></li>
					<li><a href="/2009/10/21/wicked-scary-halloween-getaway/">Wicked Scary Halloween Getaway</a></li>
					<li><a href="/2009/08/28/labor-day-hotel-deals-and-steals/">Labor Day Hotel Deals and Steals</a></li>
					<li><a href="/2009/02/01/stone-mountain-attraction/">Stone Mountain Attraction</a></li>
					<li><a href="/2009/02/01/sixflagsmagicmountai/">Magic Mountain Valencia California</a></li>
				<div id="hotdeals2">
					<a href="/packages/index/HotDeals"><img src="img/hotdeals.gif" height="90" width="90"></a>              
		<div id="getaway">[COLOR="Red"]<!-- N.b: id is already used -->[/COLOR]
		<li><a href="/2010/01/04/hello-world/">Hello world!</a></li>
[COLOR="Red"]<!-- </div> remove -->[/COLOR]

Erik J. -
Thank you. Thank you. Thank you.

  • For taking the time to look at my code (I know it is a bit of a mess, but was working with what I had) and what it was doing.
  • For being so thorough in your solution and explanation
  • And helping me understand what was happening and why

I am happy to report that I made the changes you suggested (I corrected someone else’s double use of getaway id) and in IE6 now - it looks GREAT! I now have too much white space between the Google ads and the footer when viewed in Windows2000 / FF, but am looking at the code and what I’ve learned and hoping to figure it out myself.

I should also have a very happy client.

Again - thank you and thanks to all of you who viewed my problem and gave advise.