Closed Thread
Results 1 to 3 of 3

Thread: class inside a class in css? and #

  1. #1
    zeroradius's Avatar
    zeroradius is offline Speaks fluent binary
    Join Date
    Feb 2008
    Location
    Ohio
    Posts
    1,403
    Rep Power
    25

    class inside a class in css? and #

    I have two questions, i searched both on yahoo but i am bad at coming up with efective querries for searching.

    1) is it posibel to do a class inside of a class in css? For example lets say i have a class called .replyCenter and i need it to hold values uniuqe to it for say the input{} and another class .bar is it posibel to do this?

    2) A few times i have seen css that looks like this: #dog{} what does # do?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: class inside a class in css? and #

    # is id
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  4. #3
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    Re: class inside a class in css? and #

    1) I'm not sure what you mean by the first question...
    HTML Code:
    <style>
    div.one {
    color: green;
    }
    div.one div.two {
    color: red;
    }
    </style>
    <div class="one">one
    <div class="two">two</div>
    </div>
    <div class="two">three</div>
    That's kinda a class inside of a class? The third div has black text.. untested for spelling errors but the theory works.

    2) Orjan is right if it's #name it's the id if it does not have that it's just a regular class.

    HTML Code:
    <style>
    .one {
    color: green;
    }
    #two {
    color: red;
    }
    </style>
    <div class="one">one</div>
    <div id="two">two</div>

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 10-21-2011, 08:21 AM
  2. Replies: 2
    Last Post: 03-30-2011, 07:13 PM
  3. Replies: 4
    Last Post: 06-30-2010, 09:22 PM
  4. Replies: 1
    Last Post: 10-20-2009, 08:49 AM
  5. class/class pointer question
    By MerakSpielman in forum C and C++
    Replies: 2
    Last Post: 04-12-2009, 09:20 AM

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