Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Is this css okay?

    Hi,

    I have all links set to underline in my stylesheet, but I don't want to have the images underlined (this is on a testdrive store, locally hosted, so I have no link, I'm sorry)

    I just wanted to ask if I can use the following css code to prevent underlining of images:

    Code:
    img, a:link img, a:visited img, a:hover img, a:active img {
    text-decoration: none !important;
    border: none !important;
    }
    If this is the right code should I put it right after the first part of the stylesheet, or somewhere else?

    And if it's not the right code, do you know a good one?

    Thank you in advance!

    Juliet van Ree
    Working on http://www.skull-shop.net once again.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Is this css okay?

    This would over-ride underlining for most image links and should deal with all the ones you currently have on your site, wherever you put it in the stylesheet (other than in the middle of another set of styles).

    However, it's conceivable that other links could creep in if their styles are defined in a more specific way. For example: "#navEZPagesTOC ul li a:hover" is more specific than "a:hover img" and could receive higher priority in some or all browsers if you popped images inside those links.

    These are extreme cases though, to be dealt with only if they actually occur.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Is this css okay?

    Thank you very much Kuroi!
    Working on http://www.skull-shop.net once again.

  4. #4
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Is this css okay?

    Well I added the whole css code, and it's fine in ie but firefox still sees reason to underline my images. I've browsed the forum a bit and saw the vertical align middle solution, tried that one out, but since I have transparent png's for images I was stuck with a line trough instead of underline. So I took that one out again. Does anybody know a solution to this firefox specific problem?
    Working on http://www.skull-shop.net once again.

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Is this css okay?

    Do you have a specific example, as I can't find any on your site!
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Mar 2008
    Location
    Gouda, Netherlands
    Posts
    213
    Plugin Contributions
    1

    Default Re: Is this css okay?

    I'm sorry Kuroi... it's not on my main sites... just a side project.. I've put it online, you can view it here http://hamster.julietvanree.com It is a zc, but will serve as a cms. It's completely in dutch, but luckely it;s only about the pictures...lol.
    Working on http://www.skull-shop.net once again.

 

 

Similar Threads

  1. Is this okay?
    By cdnbride in forum General Questions
    Replies: 8
    Last Post: 5 May 2010, 01:23 PM
  2. Hiding login div - Is this okay?
    By varnco in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Apr 2009, 04:32 PM
  3. Okay this is a bad habit
    By sobebabies in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 Oct 2007, 07:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg