0

am trying to develop my own wordpress custom,am having problems trying to add a sidebar float left e.g something like Twenty Sixteen theme. please help am still learning. Thank you.

1 Answer 1

0

You would do something like this with your CSS. Setting a fixed height and whatnot is only for example purposes:

#content {
  background: brown;
  width: 75%;
  height: 500px;
  float: left;
}

#sidebar {
  background: gray;
  width: 25%;
  height: 500px;
  float: left;
}
<div id="content"></div>
<div id="sidebar"></div>
6
  • Thanks But Its not Working
    – Mulusa Pro
    Commented Feb 22, 2020 at 18:59
  • @Mulusa Pupe The more specific you make your question, the easier it is to assist. Edit your question to include the basics of what you're working with if the above example is of no use to you.
    – spacer GIF
    Commented Feb 22, 2020 at 19:42
  • Thanks for your reply, i started editing the codes given above i managed to work out something out, but i think the height is giving me problems with scattered content.Please Help
    – Mulusa Pro
    Commented Feb 22, 2020 at 20:36
  • @MulusaPupe Do not define a height. The content will make it scale. If you need both the content and sidebar containers to be the same height for visual reasons, you can use flexbox. Note that using flexbox will require additional testing in Internet Explorer, if you care about those users, as its implementation of it is buggy.
    – spacer GIF
    Commented Feb 22, 2020 at 20:45
  • thank you very much
    – Mulusa Pro
    Commented Feb 22, 2020 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.