PDA

View Full Version : UL navigation displays in wrong place when viewed live.


gene-stevo
01-11-2011, 08:01 PM
Hi Everybody, I'm trying to learn to build using divs and CSS (using CS5). Having fun but frustrated because navigation menu from an unordered list shows in wrong place when viewed live. The page is at http://www.mochdrenews.co.uk/subdom-snaps (http://www.mochdrenews.co.uk/subdom-snaps) and the CSS is at http://www.mochdrenews.co.uk/subdom-snaps/misc.css (http://www.mochdrenews.co.uk/subdom-snaps/misc.css) .
I've checked my positioning of the associated divs but can't see where I'm going wrong.
I have managed to get things Hunkey Dorey by specifying what I consider to be "wrong" co-ordinates but that's not going to teach me anything.
The offending menu is supposed to load into the space imediately below the masthead but instead shows underneath this.
There are probably other issues with my code but this is the one that's really bugging me.
Hope somebody can aim me in the wright direction,
Cheers,
Gene Stevo

Ricky55
01-11-2011, 08:20 PM
Your HTML and CSS is peppered with tags that don't need to there and your CSS could be shortened massively.

For example


border-top-width: 1px;
border-bottom-width: 1px;
border-top-style: solid;
border-bottom-style: solid;
border-top-color: #CC0000;
border-bottom-color: #CC0000;

Could just be

border: 1px solid #CC0000;


You don't need to wrap the nav in a div but you've wrapped it in two?

<div id="navbox1"><div id="topnav">

You can positioned the UL without these.

As for your positioning issue I'll have to let one of the other guys have a look for you I've had a busy day today and already put in a few posts.

If no one gets back to you I'll take a look in the morning.

Cheers

Ricky

gene-stevo
01-11-2011, 10:08 PM
Thanks Ricky for your advice so far. It really is most appreciated. I was trying to create a border just for top and bottom but when I read your comments it dawned on me that a simple border statement would cost no more. Just shows, when I try to be clever the world see just how thick I really am :)
As for the redundant divs, I'll re-read that bit then and have another go later.
Learnin' all the time.
Cheers,
Eugene.

Corrosive
01-12-2011, 07:05 AM
Really the answer is not to use absolute positioning and co ordinates to position divs. Your menu should make up part of the page flow rather than just being placed on the page.

gene-stevo
01-12-2011, 11:00 AM
Thanks to both for your help & guidance. Must learn patience and read more before baring all to the internet.;-)

Ricky55
01-12-2011, 03:01 PM
Don't be silly mate we all have to start somewhere. Get asking.

I can remember so of my first questions on this forum. I didn't know my arse from my elbow.

Ricky55
01-12-2011, 03:04 PM
BTW Way that border property that I quoted was wrong if you are specifying that you want just top and bottom you'd still need to do so.

So you'd have


border-top: 1px solid #CC0000;
border-bottom: 1px solid #CC0000;

Corrosive
01-12-2011, 04:18 PM
Don't be silly mate we all have to start somewhere. Get asking.

I can remember so of my first questions on this forum. I didn't know my arse from my elbow.

Absolutely. Ask away as Ricky says. We are here to help and not judge :)

gene-stevo
01-12-2011, 04:52 PM
Thanks to both. It's so nice to be encouraged in this way. I'll be back!

domedia
01-12-2011, 08:28 PM
We are here to help and not judge :) Except for Ed; he's here to help and judge 8)

edbr
01-14-2011, 02:26 AM
haha I am the law!! -judge dread

domedia
01-14-2011, 02:39 AM
"Judge Dredd, he is the Law!"
Now tell me from which song that is.
I don't think it is quite your taste in music Ed ;-)

edbr
01-14-2011, 03:21 AM
iam the law anthrax?

edbr
01-14-2011, 04:14 AM
but you are right ,my music playlists reads like an obituary sometimes

domedia
01-14-2011, 12:53 PM
iam the law anthrax?
Right, didn't think you'd know that. You don't come across as a former metal head.

Corrosive
01-14-2011, 02:23 PM
Right, didn't think you'd know that. You don't come across as a former metal head.

By Scott Ian's beard there is no such thing as a 'former' metal head. HM forever!

domedia
01-14-2011, 03:08 PM
I think Manowar, in trying to explain how much they considered metal as part of their life, said that they would actually die for it.

I hear the sound
In a metal way
I feel the power
Rolling off the stage
Cause only one thing
Really sets me free
Heavy Metal
Loud as it can be

Corrosive
01-14-2011, 05:31 PM
I hear the sound
In a metal way
I feel the power
Rolling off the stage
Cause only one thing
Really sets me free
Heavy Metal
Loud as it can be

http://demolishmag.files.wordpress.com/2009/12/metal-horns.jpg