Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: DIV Question.

  1. #1
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default DIV Question.

    i've heard that you shouldn't use the same div twice on a web page. i've also heard it doesn't matter.

    do you know for sure if it does?

    if i explained that bad just say, i'm half asleep atm.
    +.net - omg it's coming o_o

  2. #2
    Join Date
    Aug 2008
    Posts
    39
    Tokens
    0

    Default

    You can, only if those divs are the same.
    If you have 2 different divs with the same name, they'll probaby go crashing with each other.

  3. #3
    Join Date
    Feb 2007
    Location
    West Midlands
    Posts
    1,168
    Tokens
    0
    Habbo
    Jibbish

    Latest Awards:

    Default

    unless you use classes

  4. #4
    Join Date
    Mar 2008
    Posts
    1,055
    Tokens
    0
    Habbo
    Decalan

    Latest Awards:

    Default

    Yeah, div ids should only be used once on a page but classes can be used multiple times.

  5. #5
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    thanks (;
    +.net - omg it's coming o_o

  6. #6
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    id = #
    class = .

    E.g:

    .header {
    CSS
    }

    Can be used more than once

    #header {
    CSS
    }

    Can't be used more than once ( on the same page )

  7. #7
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    I got told if you're wanting to use the same div twice it's valid to use classes not id's.
    Back for a while.

  8. #8
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    Quote Originally Posted by Calon View Post
    id = #
    class = .

    E.g:

    .header {
    CSS
    }

    Can be used more than once

    #header {
    CSS
    }

    Can't be used more than once ( on the same page )
    lol. now ya tell me after i changed my whole layout (;

    lol jk. thanks anyway.
    +.net - omg it's coming o_o

  9. #9
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    You can only use the same divs if they are the same.
    Like navigations etc, if you want them to look the same, you can use div's twice.

  10. #10
    Join Date
    Dec 2006
    Posts
    7,601
    Tokens
    95

    Latest Awards:

    Default

    Quote Originally Posted by Calon View Post
    id = #
    class = .

    E.g:

    .header {
    CSS
    }

    Can be used more than once

    #header {
    CSS
    }

    Can't be used more than once ( on the same page )
    Quote Originally Posted by Excellent2 View Post
    I got told if you're wanting to use the same div twice it's valid to use classes not id's.
    both of them are correct. Its alright to use IDs, its just not valid html thats all

Page 1 of 2 12 LastLast

Posting Permissions

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