Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Applying css style to every ‘a’ tag but not h1 a, a img

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43622
    AucT
    Participant

    Hello guys! I want to have a perfect solution for making every ‘a’, ‘a:hover’ tag have some styles – padding, background etc but the logo h1 a and a img to havent

    now I have in my mind 2 options – to clean ‘h1 a’ and ‘a img’ with padding:0 etc (even thoug I need to add id to have more selector weight) and use css3 not artibute

    currently I use first option just clean unneded elements

    And I want to hear your opinion

    here sample of my code

    http://codepen.io/anon/pen/Dfbev

    #129485
    JohnMotylJr
    Participant

    Possibly use different selectors:

    http://codepen.io/johnmotyljr/pen/KrmEs

    #129492
    AucT
    Participant

    it’s the same as with id -redeclaring, but nvm thx for pointing it out!
    thx Ive realised there are 3 variants:

    1) redeclare (clean) margins, padding, bg etc

    2) apply class to every ‘a’ tag that is not ‘h1 a’, ‘a img’

    3) use css3

    Im choosing 1st

    and thx for your time John

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.