Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 3rd, 2006, 11:36 PM   #1
ajthornton_1978
Newbie
 
Join Date: Apr 2006
Posts: 1
Rep Power: 0 ajthornton_1978 is on a distinguished road
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
ajthornton_1978 is offline   Reply With Quote
Old Apr 4th, 2006, 12:34 AM   #2
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
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
Booooze is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:45 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC