![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 1
Rep Power: 0
![]() |
background color
Here is the problem. i am trying to create a website virtually all in CSS. I am having trouble with the creating a navigation area. I want the background color to be a full 145px wide and 20 px high. When I mouse over (hover) I want the background color to change but stay the same size.
Here it the CSS code: /* navigation class link */
a.navigation:link
{
background-color: blue;
color: white;
}
a.navigation:visited
{
text-decoration: none;
background-color: blue;
color: white;
}
a.navigation:hover
{
background-color: red;
color: blue;
}
a.navigation:active
{
text-decoration: none;
}
div.box
{
width: 145px;
height: 22px;
border: 1px solid black;
line-height: 20px;
}Here is part of the html file: <div class="box"> <a class="navigation" href="http://www.auburn.edu">Auburn University</a> </div> Can anyone help me on this. If you need more information then please ask. ajthornton_1978 |
|
|
|
|
|
#2 |
|
Expert Programmer
|
fist change you <div> to this -
<div id="box"> Your css code will then change to - #box{}if you want all your links to be the same in the div "box" then you don't even need the class. Either way, I think your problem is that you got the word/class navigation in the wrong place. Try this - .navigation a:hover and if you descide to scrap the class, you can simply use #box a:hover Hope that helps ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|