is there a css guide to which class/id is associated with which element

  • Unknown's avatar

    Hi,

    If I want to customize the css of one of the elements of a theme – say the header.
    what is the best way to identify the class/id that controls the appearance of each element.
    Thanks for any help

    David

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The problem is, CSS is theme dependent which means they are virtually unique and at the whim of the theme designer. This is one of the best descriptions of the whole process that one needs to go through by a CSS guru.

    atthe404 on CSS:

    There is no trick. But doing CSS requires an understanding of the markup (xhtml). There is no way round that. The CSS applies styles to stuff. To what stuff depends on the markup. So number one read the source (View Source). Get used to it. Feel comfortable with it. Two. Understand what the heck selectors actually are. Different cats of selectors behave in different ways. SO: this is counter intuitive. To understand the CSS do not start in CSS. Start in the xhtml. Then see how they relate. Its all there. :)
    There are gazillions of CSS tutorials on line.

  • Unknown's avatar

    One of the most useful tools for doing CSS, and probably the easiest to use is the Firebug add-on for Firefox which shows the markup on one side and the associated CSS on the other. Download it and in stall it and take some time to get to know how it works and it will make things a lot easier for you, and will let you see how things relate.

  • Unknown's avatar

    Having a good understanding of HTML markup first is a really good idea.

    And I agree Firebug is great. The developer tools in Chrome and Safari are also cool. With any of those, you can right click and select the “Inspect Element” option to open a screen which shows the html element you clicked on, the CSS path for it (showing selectors), and all of the CSS that applies to that particular element. Then you just have to look for the class or id attributtes or use the element itself as a selector.

    When it comes to learning HTML and CSS, I find that lots of testing and trial and error goes pretty far.

  • The topic ‘is there a css guide to which class/id is associated with which element’ is closed to new replies.