WordPress.org

Support

Support » Themes and Templates » [Resolved] Div and alignment

[Resolved] Div and alignment

  • Not sure if this is just me not understanding not coding correctly, but in anyone can help let me know.

    I have created the following divs in the css file

    #div_split{
    clear.both;
    }
    .sub_lefthalf{
    	width: 50%;
    	float: Left;
    }
    
    .sub_righthalf{
    	width: 50%;
    	float: Right;
    }
    #div_center{
    clear.both;
    }
    .sub_centre{
    	width: 100%;
    	float: center;
    }
    
    #div_3Split{
    clear.both;
    }
    
    .sub_1{
    	width: 30%;
    	float: Left;
    }
    
    .sub_2{
    	width: 30%;
    	float: Center;
    }
    .sub_3{
    	width: 30%;
    	float: Right;
    }
    
    and the following on a wordpress page.
    
    <div id="div_split">
    <div class="sub_lefthalf" style="text-align: center;">
    ...</div>
    <div class="sub_righthalf" style="text-align: center;">
    ...</div>
    </div>
    <div id="div_center">
    <div id="sub_centre" style="text-align: center;">
    ...</div>
    </div>
    <div id="div_3Split">
    <div class="sub_1" style="text-align: center;">
    ...</div>
    <div class="sub_2" style="text-align: center;">
    ...
    </div>
    <div class="sub_3" style="text-align: center;">
    ...</div>
    </div>



    [Please use the code buttons when posting code here.]

    The problem I’m having is that the div_3split is supposed to show 3 columns next to each other, but it shows sub1 ok, then sub 2 is underneath the sub1 and is aligned to the left when it chould be center. Then sub3 is under sub2 ,but this is aligned to the right as if should be.

    If anyone can help me out or point me in the right direction.

Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Div and alignment’ is closed to new replies.