• ive currently created a template for my homepage and ive named the divs that are side by side:

    <div class=”home-left” ></div>
    <div class=”sidebar-right”></div>

    the css for both is:

    .home-left {
    	width:630px;
    	background-color:#F90;
    	float:left;
    }
    .sidebar-right {
    	width:300px;
    	background-color:#666666;
    	height:500px;
    	float:left;
    }

    but if i change the name of the sidebar div to ‘home-right’ and change the css to:

    .home-right {
    	width:300px;
    	background-color:#666666;
    	height:500px;
    	float:left;
    }

    it completely disappears…. does the css class for the div need to have sidebar in the name??

    im total confused

Viewing 4 replies - 1 through 4 (of 4 total)
  • Depending how you’ve got your theme setup (is it a child theme or are you modifying the current theme?), then yes there may be some css rules that are defining the structure of your sidebar (through .sidebar-right). Best you don’t remove the existing ids and classes defined in the markup, but if you really want to defined a .home-right for the div, add it as a second class to the div:

    <div class="home-left" ></div>
    <div class="sidebar-right home-right"></div>
    Thread Starter gezzamondo

    (@gezzamondo)

    im using the starkers theme so there are no divs, im creating them all from scratch

    Perhaps .sidebar-right is already defined in a parent CSS rule. Do you have access to firebug to check if there are any styling that would be hiding the sidebar when you rename the sidebar class to .home-right?

    please post a link to the live site to illustrate the issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Does the css class for a sidebar always need to be named sidebar?’ is closed to new replies.