dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: referring to css with space

  1. #1
    Join Date
    Feb 2011
    Posts
    90

    referring to css with space

    Hi,

    I am using wordpress and one of the class is called "jScrollPaneContainer jScrollPaneScrollable"

    In the css file how can I access class that contain spaces?

    I mean after all the space has a meaning there, it mean direct son of.

    What is t he meaning of spaces in the name of a class?

  2. #2
    Join Date
    Mar 2011
    Posts
    1,160
    It's not a class with a space in it's name. Its a way of applying more than one class to an element. In this case, the element uses both the CSS classes "jScrollPaneContainer" and "jScrollPaneScrollable" for styling.

  3. #3
    Join Date
    Apr 2010
    Location
    Cocoa Beach, FL
    Posts
    41

    CSS Multiple Elements

    In Cascading Style Sheets (CSS) you can apply the same style to multiple elements which is very handy when doing work on a large website or web application. Also you can designate that a certain style for an element only appears in a DIV with a specific ID.

    For example, you have a div with the id = "firstdiv", and you want any H1 or H2 tags that appear in that div to be bold font, but only in that DIV, you would do something like the following:

    <style type="text/css">
    #firstdiv {
    display:block;
    width:300px;
    }

    #firstdiv h1 {
    font-weight:bold;
    }

    #firstdiv h2 {
    font-weight:bold;
    }
    </style>

    Interpreted into english, this means ANY H1 and H2 tag within a div with id FIRSTDIV should be a bold font. But H1 and H2 not in a div FIRSTDIV are not formatted.

    You can do this to HTML tags and also applying a style to other DIVs or SPANs, CSS has a very flexible interpretation in this manner.

    Hope this helps.

    Michael G. Workman
    mworkman@usbid.com
    http://www.usbid.com
    http://ic.locate-ic.com
    Last edited by Michael_G; 11-30-2011 at 01:22 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles