• Hi all,

    I writing a page template and am having trouble getting two div-classes I’ve called ‘col-left’ and ‘col-right’ to appear beside each other, rather than one on top of the other.

    In the CSS I’ve currently got:
    col-left
    {
    float:left;
    margin-right:10px;
    width:48%;
    }

    }
    col-right
    {
    float:left;
    width:48%;
    }

    But it’s just not being picked up!! My parent theme is TwentyTen.

    Any help would be really appreciated.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • .col-left { ... }

    styles for css class start with a dot . in the style sheet
    (for css id they start with #)

    Thread Starter RedRunner

    (@redrunner)

    Thanks very much,

    Though still not working. I think I haven’t correctly written the div id/class in the html so it’s not being recognised in the css.

    The html looks like:
    <div id=”col-left”>
    <h4 class=”#C22828″>INSERT TEXT</h4>

    Should it be <div class=”col-left”>

    Or is this all wrongs… sorry – beginner coder here!

    if you are using:

    <div id="col-left">

    the style is:

    #col-left { ... }

    for:

    <div class="col-left">

    the style is:

    .col-left { ... }

    there is no difference on how these are shown in the browser; however, for other reasons, a css id should only be used once in a page; while a css class can be used many times.

    Thread Starter RedRunner

    (@redrunner)

    Perfect! Solved.

    Thanks so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Writing code for text areas side by side’ is closed to new replies.