Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-18-2005, 09:57 AM   #1 (permalink)
Inactive
 
downtroden's Avatar
 
Join Date: 06-19-04
Location: Illinois
Posts: 149
iTrader: 0 / 0%
Latest Blog:
None

downtroden is liked by many
Send a message via AIM to downtroden
quick css question

I have a div with a header and some subtext... what I'm wanting is the header (a link) to fill the entire background of the div with a color when hovered.

current css:
Code:
body { font-family: arial; font-size: 11px; padding: 0px; margin: 0px; } #box { width: 120px; border-style: solid; border-width: 0px 0px 0px 1px; border-color: #000000; float: left; margin-left: 5px; padding: 10px; line-height: 14px; display: block } #box a:link, a:visited{ text-transform: uppercase; font-weight: bold; color: 5599CE; text-decoration: none; font-size: 14px; line-height: 12px; } #box a:hover{ text-transform: uppercase; font-weight: bold; color: 5555CE; text-decoration: none; font-size: 14px; line-height: 12px; background-color: #CECECE; }
sample html:
Code:
<div id="box"> <a href="#">sample header</a><br> sample sub header, would be a little snippet of text in reality. </div>
I'm just not seeing why this isn't working? Shouldn't the link of the div fill the background of the div when hovered?
downtroden is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 01-29-2005, 12:56 PM   #2 (permalink)
Inactive
 
1-True-Love.com's Avatar
 
Join Date: 01-04-05
Location: http://www.1-true-love.com/
Posts: 60
iTrader: 0 / 0%
Latest Blog:
None

1-True-Love.com is liked by many
Dis you try assigning the hover to the box? That might fix your problem.
1-True-Love.com is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-04-2005, 01:42 PM   #3 (permalink)
Contributing Member
 
FGTH's Avatar
 
Join Date: 03-06-04
Location: NY, CT, CA, AZ
Posts: 555
iTrader: 0 / 0%
Latest Blog:
None

FGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to allFGTH is a name known to all
You're missing the pound signs in your color declarations:

Code:
color: #5599CE; color: #5599CE; color: #5555CE;
Also, you should include an alternate and a generic font:

Code:
font-face: Arial, Verdana, Sans;
Quote:
Originally Posted by downtroden
I have a div with a header and some subtext... what I'm wanting is the header (a link) to fill the entire background of the div with a color when hovered.

current css:
Code:
body { font-family: arial; font-size: 11px; padding: 0px; margin: 0px; } #box { width: 120px; border-style: solid; border-width: 0px 0px 0px 1px; border-color: #000000; float: left; margin-left: 5px; padding: 10px; line-height: 14px; display: block } #box a:link, a:visited{ text-transform: uppercase; font-weight: bold; color: 5599CE; text-decoration: none; font-size: 14px; line-height: 12px; } #box a:hover{ text-transform: uppercase; font-weight: bold; color: 5555CE; text-decoration: none; font-size: 14px; line-height: 12px; background-color: #CECECE; }
sample html:
Code:
<div id="box"> <a href="#">sample header</a><br> sample sub header, would be a little snippet of text in reality. </div>
I'm just not seeing why this isn't working? Shouldn't the link of the div fill the background of the div when hovered?
__________________
"90% of the game is half mental."
--Yogi Berra
Elizabeth Arden
FGTH is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick first question... CommandD SEO Forum 3 08-18-2007 11:43 AM
A Quick Question Tahir Shah Marketing Forum 2 07-22-2007 09:26 AM
quick question filip Google Forum 1 03-01-2006 02:05 PM
Quick Question inquest750 SEO Forum 7 06-05-2004 04:25 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:33 PM.
© Copyright 2008 V7 Inc

Click Here