html - Align Sidebar (Which is Placed After Content) to the Left -
basically, have layout this:
<div id="wrapper"> <div id="header"> header </div> <div id="body"> <div id="table"><div id="tablerow"> <div id="content"> main content </div> <div id="sidebar"> sidebar </div> </div></div> </div> </div> it's bit different in live website, it's structured that. problem is, want align sidebar left-side, not right-side (currently it's on right).
i'm placing sidebar after content, because content needs loaded first, sidebar next.
i tried css:
#body { overflow:auto; } #table {display:table;} #tablerow {display:table-row;} #sidebar { float:left; width:150px; display:table-cell;margin-right:5px; } #content { float:right; display:table-cell; } it works nicely in demo (jsfiddle.net), doesn't work @ in actual website.
instead, happened sidebar aligned bottom left (after content). suppose because both content , sidebar has <table>s, i'm not sure... can't remove <table> because needed reasons.
also, if wondering use of <div id="table"><div id="tablerow">, used javascript on website.
can help? pardon poor english..
here live website if needs see: http://bleachindonesia.com/forum/ (the htmls messy)
from
<div style="width: 100%; display: table;"> remove
display: table; from
<div style="display: table-row;"> remove
display: table-row; to
<div id="content" style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; float: right; display: table-cell;"> give width, such as
width: 900px; now your
<div class="lside" id="sidemenu" style="width: 20%; margin-right: 5px; display: table-cell;"> is on left side.
Comments
Post a Comment