SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Was this a question or a small tut as the above example you have is wrong anyhow considering it's an id selector NOT a class selector.

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Always remember in your mind that dot is use for class and # use for id.

  3. #3
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    And class can be used multiple times and id s only in one element.
    One can also have multiple classes by aeperatong the two with space. But only one id per one object and that id can only be used once. For example, <div class="red square" id=redSquare"></div><div class=red square bigger" id="redSquare2"></div>

  4. #4
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,413
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by team1504 View Post
    And class can be used multiple times and id s only in one element.
    One can also have multiple classes by aeperatong the two with space. But only one id per one object and that id can only be used once. For example, <div class="red square" id=redSquare"></div><div class=red square bigger" id="redSquare2"></div>
    You're missing some quote marks in there:
    Code:
    <div class="red square" id="redSquare"></div><div class="red square bigger" id="redSquare2"></div>

  5. #5
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh whoops. Sorry Thank ks for catching that
    I was jist leaving work and on sitepoint on my phone


Tags for this Thread

Bookmarks

Posting Permissions

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