Help - Search - Members - Calendar
Full Version: Navigation positioning problem...
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
rufusbabe
Hi,

Just wondering it anyone can help... I am trying to get my left hand navigation to sit at the top of the cell and no matter what I change it won't budge!

You can see what I am working on at www.freedomwhalewatch.com.au/Stirling/index.html

As you can see the left hand navigation is sitting towards the bottom... anyone have any suggestions as to how I would move it up to be directly underneath the logo?

To see my working files just use the right click and view page source.

Any help or suggestions would be much appreciated. I am a newbie to css!

Cheers,
Jen
huh.gif
pandy
Take a look at the 'valign' attribute. The default is "middle". smile.gif
http://htmlhelp.com/reference/html40/tables/td.html


QUOTE

Any help or suggestions would be much appreciated. I am a newbie to css!


OK. You should use a doctype and that's for two reasons. As you use CSS you don't want browsers to be in Quirks Mode.
http://hsivonen.iki.fi/doctype/
You don't need to read and understand everything at that site. Just understand that your choice of doctype affects the layout mode of browsers and choose one from the table at the bottom of the page that suits your markup and gives you Standards Mode (AKA Strict mode).

You also need a doctype to be able to validate properly. By doing that you can correct markup errors that may affect how the page renders and how CSS works with the HTML.
http://www.htmlhelp.com/cgi-bin/validate.c...s&input=yes

For checking your CSS go here: http://jigsaw.w3.org/css-validator/ .
rufusbabe
Hi Pandy,

Thanks so much for those tips. Will try them tonight and hopefully rectify my issues with css and positioning. tongue.gif

cheers,
Jen
Frederiek
Talking about positioning, you use absolute positioning on .sidebarmenu ul. Why use positioning anyway?
pandy
QUOTE
I am a newbie to css!


That's why.

I'm not trying to make fun of you, rufusbabe. But CSS newbies often do that, try to position everything. Save positioning for when it's really needed. With CSS, as with many other things, less is more. Anyhow, positionings is IMHO not where you should start learning CSS.

(Maybe there is a good reason for the AP, I didn't look, I just trusted Frederiek. tongue.gif)
Frederiek
Thank you! blush.gif

Anyway, the menu is simply a list in a div within a table at an absolute position. The positioning takes it out of the document flow, so out of the table. Then the table's valign attribute doesn't make sense anymore.

http://www.vision.to/articles/the-differen...r-web-pages.php (through http://www.positioniseverything.net/).
pandy
That's odd, because I actually edited the HTML to check if valign=top would work (even if I didn't read the CSS). It did. unsure.gif
Frederiek
That's what it has now, yes. Only .sidebarmenu ul still has position: absolute which no longer is needed and which serves nothing either.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.