View Full Version : CSS Positioning

11-02-2006, 05:52 PM
Hello everyone,

I have a prospective client that has a strange request. I wanted to get some feedback from other professionals before I told the client that this is probably not possible.

The client basically wants to switch up the presentation of their header and footer. They want the footer placed at the top of the code, but at the bottom of the design, and the header at the bottom of the source code but on the top of the page. The only solution I've come up with is to position the footer at the bottom most part of the page, but they want the header to change position in relation to how big the content section is, which would be below it.

I have scratched my head over it and tested for about an hour and can't come up with a solution at all. Is this even possible? It is for SEO purposes I assume...



11-02-2006, 06:03 PM
Well, I don't see how this would really help SEO, I've never heard of anything like that before. The weird thing is, if your client seems to know so much about web design and SEO, why is he/she hiring somebody else to do it? Maybe you should find out about why they want to do this... they may be just repeating some bad info they heard from somewhere else, in which case you can help them by setting it straight.

11-02-2006, 06:05 PM
Well, I am familiar with SEO and what their main goal is, is to have the navigation and content as close to the top of the code as possible. Their navigation is in the footer (why, I am clueless also). They are mainly contracting me to fix their CSS for IE7, which looks horrendous.

11-02-2006, 06:13 PM
Well, obviously the header and footer has to be displayed out of the normal flow of the code... so all I can think of is absolute positioning. There may be some other trick or way around this, but absolute positioning seems like it could work. I'm not sure what you mean when you say they want the header position to change based on the size of the content, though...

11-02-2006, 06:15 PM
Yeah that was my first approach, and the "header" positioned itself perfect at the top of the page in about 4 different browsers. The real issue is the "footer", which exists on top of everything else in the code, but must stay beneath the content, even though the content fluctuates in size. I could absolutely position the "footer", but these people have over 100 pages on their site and not all pages have short content, so...I don't know really...

11-02-2006, 06:18 PM
Couldn't you make a "dummy" div below the content, the same size as the footer (this would create the right amount of space below the content), and then place the footer absolutely so that it sits on top of that div? That definitely classifies as meaningless markup, but with an odd request like this that would be hard to avoid.

11-02-2006, 06:35 PM
I'm not sure thats feasible either. Under the content is a "left-panel" and of course our misplaced header. So confusing...I think I'm just going to have to tell the client that this isn't possible in the amount of time they are willing to pay me for.

11-02-2006, 06:43 PM
Yeah... sounds like there are lots of complications... good luck, that sounds like it would be frustrating.

11-03-2006, 03:58 PM
...sounds weird to me. I don't know why they attempt to do that. Yes it's possible using absolute positioning. However this is confusing to work with. Yous sure your client aren't fooling around with you? Good Luck.

11-03-2006, 04:13 PM
lol if they are I'll have to give them a big Battletoads boot to the *** and find some new ones.