Forums

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
    Posts
  • #32211
    tjgriffiths1
    Participant

    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
    {
    font-size="80%"
    }

    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

    #52590
    davidlab.be
    Participant

    you can also write it like…



    div#links {
    font-size: 80%;
    }
    #52578
    tjgriffiths1
    Participant

    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.

    #52553
    TT_Mark
    Member
    div #links

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

    e.g.





    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)

    #51461
    angus
    Participant

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

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