html - Aligning content to center with toggle sidebar -
i have used code toggle sidebar found on stackoverflow. 1 of biggest issues aligning content center while sidebar toggled. cannot of content in #b div arrange middle when toggled on or off. here jsfiddle:
http://jsfiddle.net/hthgb/4054/
now, have done odd. #b, have given following properties
width: 100%; margin: 0 auto; simple enough right? doesn't center ".center" div ti should. instead make page scrolls (to right). issue in page being told 100% + 200px wide. if use calc(100%-200px) work, not center out div. what's going on here?
i'm not sure i'm going right way, feel shouldn't difficult.
add following..
css:
.center { text-align:center; width: 100%; } #b{ text-align:center; } update jsfiddle link
Comments
Post a Comment