I’m having trouble finding a way to get my sidebar and main content area to be in line with each other. What can I do? I don’t think I know how to edit my content width. I’ve attempted to change the margins of the sidebar, but that only places the sidebar above my content. I want them to be right beside each other.
/*
Theme Name: WordPress Test
Author: Linh Nguyen
Author URI: *mylink*
Version: 1.0
*/
body {
font-family: 'Cardo', serif;
font-size: 13px;
color: #3d3d3d;
}
a:link,
a:visited {
color: black;
text-decoration: none;
}
p {
line-height:13px;
}
h1, h2 {
font-family: 'Montserrat', sans-serif;
text-transform: uppercase;
}
h5 {
font-size: 0;
text-indent: -1000px; }
/* General Layout */
div.container {
max-width: 950px;
margin: 0 auto;
padding-left: 20px;
padding-right: 20px;
}
#header {
background: url(http://localhost:8888/wordpress/wp-content/uploads/2015/07/header-e1437695892390.jpg)
no-repeat top center; }
#headerimg {
margin-top: 0px;
padding-bottom: 20px;
height: 130px;
width: 500px; }
#sidebar {
float: left;
}
There are different ways, one of them can look like this:
See example here: http://jsfiddle.net/9a0eah5j/
You’ve got several problems:
You need to float both divs to the left
You can’t give them a total width of 100% because of the padding on the container div.
The class ‘sidebar’ should be applied to a wrapper div, not UL:
And your sidebar div can’t be nested within the class container.