Jump to content

Is this right?


straightryder

Recommended Posts

Hello, back again pulling out my hair... with another newbie question.

 

So... did i do this correctly or should I just leap off a tall buildin'?

 

 

CSS:

 

#nav {

width:170px;

float:right;

margin-top:70px;

}

 

#nav ul {

width:170px;

display:block;

list-style:none;

padding:0px;

margin:0px;

}

 

#nav li a:link {

text-decoration:none;

color:#9cdbfb;

font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;

display:block;

}

 

#nav li a:hover {

color:white;

text-transform:uppercase;

}

 

#nav li {margin-bottom:3px;}

 

.airport {

height:70px;

font-size:20px;

background-color:#000;

border-bottom:thin inset white;

-moz-border-radius: 10px;

-webkit-border-radius: 10px;

background-image:url(images/menu_icons/airplane_selector.png);

background-position:5%;

background-repeat:no-repeat;

}

 

** .airport .banking .beaches .embassys.... etc: each have a different icon for each list item.

Now, when I try to close off the

in DW it automatically requests an immediately after the closing .

 

Am i missing something here?

 

HTML:

 

Edited by straightryder
Link to comment
Share on other sites

this is getting better...BeeDev i fixed the moronic

and it worked. Now i got this issue:

 

ishot-2-2.jpg

Now the a:links sit at the very top when im trying to center them... I tried padding and margin but zero movement to get them centered.

 

I've tried padding but that just creates more black space an' adding margins isn't working.

Edited by straightryder
Link to comment
Share on other sites

Yea.

 

In your style.css on line 98 change the line that says:

 

#nav li a:link {

 

to

 

#nav ul li a {

 

That should do it.

 

Also thing to note is: This fix will make the a:visited bits on your css stop working, because the normal "#nav ul li a" will keep overwriting the ".theaters a:visited" and similar rules. Because the statement: "#nav ul li a" has 1 ID in it, and your "a:visited" statements only have classes in it. So the rule of thumb is: ID > Class > Tag

 

A CSS statement that has 2 ID's on its declaration (for example: "#wrapper #nav ul li a") will always override a rule with 1 ID on its declaration (the last example would override a statement like: "#nav ul li a" because there's only 1 ID here). Same rule applies to classes, a declaration with 2 classes will override declaration with 1 class and no ID's in it. This is referred to as "CSS specificity" you can read a very simple article about how to calculate specificity here:

http:// htmldog.com/guides/cssadvanced/specificity/ (Remove 1 space)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...