|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
css
This is probably a newbie question,
Code:
<style>
.menu {
background-color:003366;
width:150;
color: white;
text-align: center
}
.submenu {
position:absolute;
background-color:#222;
width:150;
}
</style>
</head>
This code seems to work just fine with my menu's but ifI place it inside a css file like this : Code:
.menu {
background-color:003366;
width:150;
color: white;
text-align: center
}
.submenu {
position:absolute;
background-color:#222;
width:150;
}
and add Code:
<link rel="stylesheet" href="style.css" type="text/css"> it doesnt work. What am I doing wrong ? |
|
#2
|
|||
|
|||
|
try putting it in the top of the css. If it works than there's something wrong in your stylesheet.
b.t.w. width:150; should be width:150px; |
|
#3
|
||||
|
||||
|
That is interesting, especially since you don't have a type="text/css" in your <style> tag.
I'm also intrigued by your CSS. In .menu you use background-color:003366, then in .submenu you use background-color:#222. Strange that you use different styles of styles. Also, no need for position:absolute unless you're going to give it a top/left or other coordinates (I don't think). And proper CSS states you should have a color: with every background-color.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#4
|
|||
|
|||
|
Quote:
Thank you Sir, there was indeed an error in my css file. Really appreciate your help ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > css |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|