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

Home Forums CSS Class & ID

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #32211

    Hey Guys,

    Really struggling with this concept, basically trying to position tables around my page, so am using div elements to seperate them, and am TRYING to add a class and ID to add styles to each DIV tag. HOWEVER, I just can’t seem to get it to work, I have checked the w3schools explanation and the htmldog description and so i think i know what i’m doing, but it’s still not responding.

    Can anyone give me any tips as to why it wouldn’t be working?

    I’ll just give a quick example of what i’m doing…

    And then i have a seperate stylesheet (which is linked correctly) and i am putting something like

    div #links

    Obviously this is just an example to show you what i’m doing, and hopefully you can point out what i’m doing wrong?

    FYI, I’m using Firefox V3.6


    you can also write it like…

    div#links {
    font-size: 80%;

    Thanks @springlab & @Fourize!

    After a couple of hours i think i’ve got it cracked. Just got to keep track of id names etc.

    Thanks for your help.

    div #links

    is a div with another element inside it that has the id ‘links’


    to target the div called links you must not have a space between the element type and it’s id (or even class for that matter)


    Also, <a href=””>GOOGLE</a> will link to To link to an external site, you must prefix it with http://, such as: <a href=””>GOOGLE</a&gt;.

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