Old 27-12-2009, 03:23   #1 (permalink)
vks
Registered User
 
vks's Avatar
 
Join Date: Dec 2009
Location: Melbourne, Australia
Posts: 17
Need Help with CSS

Hi guys

New to the forum - First Post

Need some help with CSS. I am making a website and i want to have a hover function over the menu which is simple text with <a> links so i have the following code:
----------------------------
a:hover {
color: #FFF;
text-decoration: none;
display: inline-block;
background-color: #ff7e00;

----------------------------

This code works great with the menu text, its just how i want it, but i have a problem as this applies it to the whole page including images that are used as links so i end up getting a orange background if i hover over images that have transparency - especially around the ednges.

Does anyone have any suggestions how i can fix this or a work around? If my post is not clear, i will post some pics.

Thanks in advance
  Reply With Quote
Old 27-12-2009, 03:33   #2 (permalink)
vks
Registered User
 
vks's Avatar
 
Join Date: Dec 2009
Location: Melbourne, Australia
Posts: 17
w ww. imagecabin. com/?view=261899041876108a93c42e4df

Here is an image to make things clearer

forum will not allow me to post links - so i had to separate the link
  Reply With Quote
Old 27-12-2009, 03:42   #3 (permalink)
DKuntz2
That Kid
 
DKuntz2's Avatar
 
Join Date: Apr 2009
Posts: 1,372
html page:
Code:
<div id="nav"><a href="#">Home</a>......... (all of your nav links)</div>

css:
Code:
#nav a:hover {blah}

A pound sign in css identifies something as an id, an element that is only used once on each page, and period before something identifies a class, which is used multiple times throughout the page.
  Reply With Quote
Old 27-12-2009, 05:24   #4 (permalink)
vks
Registered User
 
vks's Avatar
 
Join Date: Dec 2009
Location: Melbourne, Australia
Posts: 17
Quote:
Originally Posted by DKuntz2
html page:
Code:
<div id="nav"><a href="#">Home</a>......... (all of your nav links)</div>

css:
Code:
#nav a:hover {blah}

A pound sign in css identifies something as an id, an element that is only used once on each page, and period before something identifies a class, which is used multiple times throughout the page.

Thanks buddy, im gonna try that now and see if it works fingers crossed
  Reply With Quote
Old 27-12-2009, 05:31   #5 (permalink)
vks
Registered User
 
vks's Avatar
 
Join Date: Dec 2009
Location: Melbourne, Australia
Posts: 17
Thanks man ur a champ! it works hahah its amazing
  Reply With Quote
Old 27-12-2009, 09:01   #6 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 5,913
Quote:
Originally Posted by DKuntz2
html page:
Code:
<div id="nav"><a href="#">Home</a>......... (all of your nav links)</div>

css:
Code:
#nav a:hover {blah}

A pound sign in css identifies something as an id, an element that is only used once on each page, and period before something identifies a class, which is used multiple times throughout the page.

It's a hash symbol (#), not a pound sign.
__________________
  Reply With Quote
Old 27-12-2009, 15:04   #7 (permalink)
DKuntz2
That Kid
 
DKuntz2's Avatar
 
Join Date: Apr 2009
Posts: 1,372
My phone says "press the pound button to quite" on my voicemail, there are two non-number buttons, * and the #, which it calls a pound.

In America, where I live, it's called the pound sign. In the UK, where you live, it's called a hash.

Number sign - Wikipedia, the free encyclopedia
  Reply With Quote
Old 27-12-2009, 15:31   #8 (permalink)
seen.to
unusual suspect ™
 
seen.to's Avatar
 
Join Date: Jul 2004
Location: DE, USA
Posts: 4,682
Yeah they call it a pound sign over here. Was most confused to hear "Press pound" on the phone at first. Apparently first created by printers as a single symbol replacement for lb. Have yet to see it used as a pound symbol though (e.g. Apples: $3 a #).

Pressing ALT+# on a Mac gives the real pound symbol (£) which is handy since it doesn't otherwise exist on US keyboards.

Personally, I call it the number symbol or hash and for people that don't know wtf I'm talking about I call it the little tic-tac-toe thingy.
__________________
  Reply With Quote
Old 27-12-2009, 17:06   #9 (permalink)
vks
Registered User
 
vks's Avatar
 
Join Date: Dec 2009
Location: Melbourne, Australia
Posts: 17
lol yeah hash/pound :P i knew what it was, we call it hash here in Australia but im aware that other countries call it a pound.

Thanks for the help.
  Reply With Quote
Old 27-12-2009, 18:59   #10 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 5,913
Fair enough, guess you learn something every day.
__________________
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet