Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] What a mess! Re: [Solved] What a mess!

#59502
Rob MacKay
Participant
"wowell" wrote:
I’ve removed the table from the navigation, but its still not showing up. I’m wondering whether it has something to do with the z-index? there isn’t one set for the navigation, but there is for the div its in.

Sorry I must seem like such a silly student!

the silly student is the one who is too proud to ask for help ;)

I think you are making things far more difficult for yourself than needed. I see you are using an image map, are you using fireworks?

You are using quite a lot of old-school techniques as well…

First off though you have an extra </div> after the closing navigation div.

Getting into it – I would say you need to go from the beginning – its in a bit of a pickle. This is how I would structure it.

Code:

A1 Kiteboarding School

A1 Kiteboarding School

Now your CSS is something else! I am going to try and give you some pointers as I don’t have time to dig through it all.

Ok you are using positioning, this is GOOOOD :D well done – BUT you let yourself down with some of your padding adventures… -100px on right? whats that all about :D

You rely on z-index farrrr too much. z-index is something that is not really that reliable, I would always recommend using the structure of your document tree before anything like that. What I mean is the further through the HTML you go the higher to the top of the pack something is.

Example:

<div> 1 </div>
<div> 2 </div>
<div> 3 </div>

Now if you absolutely positioned these divs, the div with "3" inside would be on the top. Imagine dealing a pack of cards, the first card you put down is on the bottom of pile, and you add more to the top of it. Its the same within the structure of html.

So only use z-index when you really need to break out of that.

*uses police loud hailer* Put the tables down, turn around slowly and put your hands in the air!

You don’t need tables, the only time you should use tables is when you have some data like a member list or something that needs to be in a table. Not for site structure :)

I hope all that helped sorry I couldn’t go any deeper.

Also If you want to understand Positioning a little better:
http://alteredaspect.info/the-art-of-css-positioning/

</self pimp>

PS. Don’t use "align" in divs or anything else really – you should only be using id and class inside them and then styling it elsewhere. Forms and things like that are the exception.