CSS Floating footer problem

Hi,

Do you want to lose the fixed footer effect in IE6? You seem to have half the code only in place anyway which is probably causing the issue I think.

If you want a normal footer then remove all these styles completely.


 * html body{
  overflow:hidden;
 } 
 * html div#mainWrapper{
  height:100%;
  overflow:auto;
 }
 * html .footer{
     margin-top:-90px;
 } 


Then remove the bottom padding for IE6 from here and make sure the footer is cleared:


#bottomLinks {
    width: 1000px;
    margin-right: auto;
    margin-left: auto;
    padding-top: 5px;
    padding-right: 0px;
    padding-left: 0px;
    padding-bottom:90px
}
[B]* html #bottomlinks{padding-bottom:10px}

.footer{clear:both}
[/B] 

If you meant that you wanted a fixed footer for iE6 then that would need html changes and a few more hacks.

Update:

Still can’t figure out a fix for this but I have noticed that it mostly happens on this page and it always gets stuck just below the Flash movie part way down the page. It’s like the browser allows you to scroll down keeping the footer at the bottom but then hits the Flash movie and decides to drop the footer in place under the movie instead of carrying it to the bottom.

Wierd and very frustrating.

I can’t acces that link - it asks for a password etc. :slight_smile:

Also I assume we are still talking about IE6 only here?

Off Topic:

don’t tell me, you’re one of those developers spending the nights sleeping. i thought this was a legend!

If it were up to me the site wouldn’t have either the drop down menu OR the fixed footer and one of the reasons I’m struggling with this code is that I never normally get involved in stuff like this, but it isn’t up to me and it’s too far into the project to change now, this is only one of several sites based on the same layout.

I need to properly absorb what you’ve all said so I’m going to do that in the morning when I’m not so tired, thanks a lot guys, much appreciated. :slight_smile:

I couldn’t get it to go wrong either.

I notice in the drop down on the Ernst and Young page you have invalid nested comments which could cause a problem as it leaves an end tag showing.


<!--<!--<li><a href="greenbridge-profile.html">Greenbridge Profile</a></li>-->-->


That’s invalid and will show the last closing list which could trip other errors.

I also note that the footer is 100% width but has 5px padding and borders making it 12px too big. Remove the width for IE (but you may need to set haslayout on it anyway).

Add the dimensions to the image in the footer with the width and height attributes.

On the acknowledgements page the footer will be half way up the screen as there is little content. Your client isn’t talking about this in error perhaps?

Ok, I’m seeing radically broken and different layouts across all browsers. That the sidebar flash videos are depth sorting over the fixed footer would be reason enough IMHO to lose the fixed footer alltogether – it’s a cutesy effect and not something I’d be considering a deal-breaker to loose. If that information is THAT important, move it up to the top and take an axe to the GIANT oversized banner image.

One of the first things I see breaking here is the menu – you used dynamic fonts which automatically enlarge 25% on large font/120dpi systems (like mine), so they’re word-wrapping to two line and not lining up with the fixed width buttons. As a rule of thumb I avoid fixed width buttons for this very reason. From there I’ve got column drop in IE6 (which is why the fixed footer is riding up I think… still not sure on that)

Peeking under the hood it’s knee deep in things I’d never put into the code of a page, starting with that STUPID MALFING ADOBE mm_ javascript malarkey… (pretty much if it comes from adobe and is javascript, don’t use it!) but going from there to image maps, no images off graceful degradation, endless nested DIV for no good reason, endless classes on elements that don’t need them, that GOD AWFUL “lets’ bloat out the markup sent to every browser with conditionals and table abuse” menu nonsense, much less nonsensical heading orders (You’re not supposed to have more than one h1, and all other headings are supposed to be SUBSECTIONS of that H1)…

Basically I’d be throwing a third of your markup away before I’d even be THINKING about addressing layout issues.

A more sensible markup would be something like this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	lang="en"
	xml:lang="en"
><head>

<meta
	http-equiv="Content-Type"
	content="text/html; charset=utf-8"
/>

<meta
	http-equiv="Content-Language"
	content="en"
/>

<link
	type="text/css"
	rel="stylesheet"
	href="screen.css"
	media="screen,projection,tv"
/>

<title>
	International Market Advisor - Libya home page
</title>

</head><body>

<div id="pageWrapper">

	<h1>
		International Market Advisor<br />
		<small>Doing Business in <b>Libya</b></small>
		<span></span>
	</h1>
	
	<div class="inAssociation">
		In Association with
		<a href="http://www.ukti.gov.uk" class="uk">
			UK Trade & Investment
			<span></span>
		</a> and the <a href="libya-investment-authority-profile.html" class="lia">
			Libya Investment Authority
			<span></span>
		</a>
	<!-- .inAssociation --></div>
	
	<ul id="mainMenu">
		<li class="current">
			<a href="index.html">Home</a>
		</li><li>
			<a href="#">Welcome</a>
			<ul>					
				<li><a href="foreword.html">Foreword - UK Ambassador to Libya </a></li>
				<li><a href="director.html">Introduction - First Secretary, Head of Trade and Investment (Libya) </a></li>
				<li><a href="lbbc-chairman.html">Welcome - Chairman of the Libya British Business Council Libya </a></li>
			</ul>
		</li><li>
			<a href="#">Guide</a>
			<ul>
				<li><a href="intro.html">Introduction</a></li>
				<li><a href="preparing-to-export-to-libya.html" >Preparing to export to Libya </a></li> 				
				<li><a href="how-to-do-business-in-libya.html" >How to do business in Libya </a></li>
				<li><a href="business-etiquette-languages-culture.html" >Business Etiquette, Languages & Culture</a></li>
				<li><a href="what-are-the-challenges.html" >What are the challenges</a></li>
				<li><a href="how-to-invest-in-libya.html" >How to invest in Libya</a></li>
			</ul>
		</li><li>
			<a href="#">Advice & Support</a>
			<ul>
				<li><a href="uk-trade-and-investment.html" >UK Trade & Investment Profile</a></li>
				<li><a href="british-embassy-in-libya.html" >British Embassy in Libya Profile</a></li>
				<li><a href="libya-investment-authority-profile.html">Libyan Investment Authority Profile</a></li>
				<li><a href="libyan-british-business-council.html" >Libyan British Business Council Profile</a></li>
			</ul>
		</li><li>
			<a href="#">Resources</a>
			<ul>
				<li><a href="contacts.html">Contacts</a></li>
				<li><a href="resources.html" >Useful links</a></li> 
				<li><a href="tradeshows.html" >Trade Shows</a></li>
			</ul>
		</li><li>
			<a href="#">Strategic Partners</a>
			<ul>					
				<li><a href="ba-profile.html">B.A Profile</a></li>
				<li><a href="bdp-profile.html">BDP Profile</a></li>
				<li><a href="bp-profile.html">B.P Profile</a></li>
				<li><a href="corinthia-hotel-profile.html">Corinthia Hotel Profile</a></li>
				<li><a href="dawsons-profile.html">Dawsons Profile</a></li>
				<li><a href="ernst-and-young-profile.html">Ernst & Young Profile</a></li>
				<li><a href="libya-online-profile.html">S.I.T.S Profile</a></li>
				<!--<li><a href="greenbridge-profile.html">Greenbridge Profile</a></li>-->
				<li><a href="mib-profile.html">M.I.B Profile</a></li>
				<li><a href="misurata-profile.html">Misurata Free Zone Profile</a></li>
				<li><a href="mott-macdonald-profile.html">Mott MacDonald Profile</a></li>
				<!--<li><a href="standard-chartered.html">Standard Chartered Bank Profile</a></li>-->
			</ul>
		</li><li>
			<a href="#">IMA</a>
			<ul>
				<li><a href="about-ima.html" >About IMA</a></li>
				<li><a href="acknowledgements.html" >Acknowledgements</a></li>
			</ul>
		</li>
	</ul>
	
	<div id="fauxColumns">
	
		<div id="content">
	
			<h2>About this guide</h2>
			<p>
				Are you a member of a UK company wishing to export overseas? Interested in entering or expanding your activity in the Libyan market? Then this guide is for you!
			</p><p>
				The main objective of this <strong>Doing Business Guide</strong> is to provide you with basic knowledge about Libya; an overview of its economy, business culture, potential opportunities and an introduction to other relevant issues. Novice exporters, in particular will find it a useful starting point...
			</p><p>
				Further assistance is available from the UK Trade &amp; Investment team in Libya. Full contact details <a href="uk-trade-and-investment.html">are available</a> within this guide.
			</p>
			
			<h2>Libya</h2>
			<p>
				Since 1999, when the UN Security Council suspended more than a decade of sanctions, Libya&#8217;s image has changed dramatically. And as it pursues a policy of diversifying its income away from oil and gas, it is attracting more foreign interest than ever before.
			</p><p>
				In fact, there has never been a better time for UK companies of all sizes and make-up to turn their attentions to Libya. While the State dominates the economy, the private sector is growing fast, assisted by organisations such as the Libyan Businessmen Council which raises awareness of the opportunities for foreign investors and provides access to potential Libyan partners.
			</p><p>
				Reform is underway with modernisation in the banking sector while the Libyan Investment Authority is emerging as a $100 billion Sovereign Wealth Fund and the government is committed to investing for current and future generations. Libya has more than 45 international oil companies engaged in production and exploration, and is rapidly and massively increasing investment in infrastructure.
			</p><p>
				Many other sectors are also experiencing growth, including transport and telecommunications, while plans to develop defence capabilities, encourage tourism, improve healthcare, expand financial and legal services, and extend education and training programmes present a wide range of business and investment opportunities for foreign companies.
			</p><p>
				Libya consistently ranks as North Africa&#8217;s top performing economy, with little debt, a healthy capital surplus, a relatively small, adaptable and highly educated population, and carefully planned budget expenditures. Despite the recent global downturn, Libya has weathered the storm and continues to experience growth in key sectors. The fall in the oil price may slow the current rate of expenditure but its commitment to diversify its income promises increased opportunities outside of the oil and gas industry.
			</p><p>
				Geographically, Libya is close to Europe - a huge consumer market and source of supply. This location also makes it an ideal transit zone for companies seeking to export to Africa through its Free Trade Zone in Misratah.
			</p><p>
				Of course,&#160;doing business in Libya presents significant challenges to foreign investors: decision-making is often slow and the lack of transparency and frequent changes in legislation can be frustrating. But with the advice and support of UK Trade &amp; Investment and the Libayn British Business Council, these difficulties can be anticipated and overcome.
			</p>
		<!-- #content --></div>
		
		<div id="sideBar">
			<h2>Videos</h2>
			
			<h3>
				Bernd Ratzke, a Partner at Dawsons Solicitors talks about various business opportunities opening up to UK companies in Libya.
			</h3>
			
			<object
					type="application/x-shockwave-flash"
					data="http://www.topgamez.net/media/chronotron.swf"
					width="580"
					height="435"
				>
					<param name="movie" value="http://www.topgamez.net/media/chronotron.swf" />
					<param name="quality" value="high" />
    			<!-- alternative content should go here -->
				</object>
			
			<object
				type="application/x-shockwave-flash"
				data="flowplayer-3.2.2.swf"
				width="320" height="240"
				id="flowplayer"
			/>
				<param name="movie" value="flowplayer-3.2.2.swf" />
				<param name="allowfullscreen" value="true" />
				<param name="flashvars" value="config={'clip':{'url':'mymovie.mp4','autoPlay':false}}" />
			</object>

			<div class="divider"></div>
			
			<h3>Misurata Free Zone - Corporate video presentation</h3>
			<object
				type="application/x-shockwave-flash"
				data="FLVPlayer_Progressive.swf"
				width="320" height="240"
				id="FLVPlayer"
			>
				<param name="wmode" value="transparent" />
				<param name="movie" value="FLVPlayer_Progressive.swf" />
				<param name="salign" value="lt" />
				<param name="quality" value="high" />
				<param name="scale" value="noscale" />
				<param name="flashvars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=assets/misurata/misurata&autoPlay=false&autoRewind=false" />
			</object>
			
		<!-- #sideBar --></div>
		
		<div id="terms">
			<ul>
				<li><a href="terms-and-conditions.html">Terms & Conditions</a> |</li> 		
				<li><a href="privacy.html">Privacy</a></li> 		
			</ul>
			<a href="http://validator.w3.org/check?uri=referer">
				<img src="assets/html-valid.jpg" alt="WC3 valid CSS 2.1" />
			</a>
			<a href="http://jigsaw.w3.org/css-validator/check/referer">
				<img src="assets/css-valid.jpg" alt="WC3 valid HTML 4" />
			</a>
		<!-- #terms --></div>
		
	<!-- #fauxColumns --></div>
	
<!-- #widthWrapper --></div>
	
<div id="footer">
	<p>
		Doing business in Libya Guide <b>Strategic Partners</b>. Please click on the logos below to view our partner's Libya case studies or to find out how our partners can help you succeed in Libya
	</p>
	<ul>
		<li>
			<a href="ba-profile.html">
				<img src="images/baLogo.png" alt="British Airways" />
			</a>
		</li><li>
			<a href="bdp-profile.html">
				<img src="images/dbpLogo.png" alt="DDB" />
			</a>
		</li><li>
			<a href="bp-profile.html">
				<img src="images/bpLogo.png" alt="British Petroleum" />
			</a>
		</li><li>
			<a href="corinthia-hotel-profile.html">
				<img src="images/corinthiaLogo.png" alt="Corinthia Hotel" />
			</a>
		</li><li>
			<a href="dawsons-profile.html">
				<img src="images/dawsonsLogo.png" alt="Dawsons" />
			</a>
		</li><li>
			<a href="mott-macdonald-profile.html">
				<img src="images/mottMacLogo.png" alt="Mott MacDonald" />
			</a>
		</li><li>
			<a href="ernst-and-young-profile.html">
				<img src="images/earnstYoungLogo.png" alt="Earnst &amp; Young" />
			</a>
		</li><li>
			<a href="misurata-profile.html">
				<img src="images/misurataLogo.png" alt="Misurata" />
			</a>
		</li><li>
			<a href="mib-profile.html">
				<img src="images/mibLogo.png" alt="MIB" />
			</a>
		</li><li>
			<a href="sits-profile.html">
				<img src="images/sitsLogo.png" alt="SITS" />
			</a>
		</li>
	</ul>
</div>

</body></html>

Which would be better for SEO, better for accessibility, and provides all the hooks you need to make that same layout using CSS.

I have a saying – CSS is only as good as the markup it’s applied to; IMHO your markup is overcomplicated, so your CSS is likely also problematic.

I would DEFINATELY pitch ALL the IE conditional nonsense. To ‘fix’ IE screwing up position:fixed on the footer, I’d just go

  • html #footer {
    position:static;
    }

In the normal stylesheet.

Silly question – do you have floats before it?

Put clear:both on the IE stylesheet in .footer – see if that helps. – edit – nevermind, you already have it. I would suspect then that you have stuff absolute positioned on the page for content itself, or have some sort of validation error.

BTW, the IE specific stylesheet only needs to contain values that are DIFFERENT from the main stylesheet – so there’s ZERO reason to be redeclaring the colors, padding, etc unless they are DIFFERENT since both stylesheets are called.

(Just PART of why I don’t see the point in using IE conditionals on CSS)

Really all you should be needing to send legacy IE is


.footer {
	position:static;
	clear:both;
}

Since otherwise you’re just declaring everything twice for no good reason.

Overall though, as Paul said we’d need to see the current version of the page to tell you where things are going wrong.