Modifying your blog's width is not all that complicated - you just need to know what to look for and how it works.
To get started, we need to first navigate to our template's source:
Next we are going to find our most common content wrappers #header, #content-wrapper, #main-wrapper and #sidebar-wrapper by scrolling through the section of our template source:
#header {
width: 800px;
margin: 0 auto;
background-color: $headerBgColor;
border: 1px solid $headerBgColor;
color: $headerTextColor;
padding: 0;
font: $headerFont;
}
[...]#content-wrapper {
width: 800px;
margin: 0 auto;
padding: 0 0 15px;
text-align: left;
background-color: $mainBgColor;
border: 1px solid $borderColor;
border-top: 0;
}
#main-wrapper {
margin-left: 14px;
width: 504px;
float: left;
background-color: $mainBgColor;
display: inline; /* fix for doubling margin in IE */
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
#sidebar-wrapper {
margin-right: 14px;
width: 240px;
float: right;
background-color: $mainBgColor;
display: inline; /* fix for doubling margin in IE */
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
The parts we want to edit are the widths.Start with the #content-wrapper and #header, and pick your desired overall width. For example, most of the default templates have a width of 660. As you can see here I changed my template to a width with 800. Then divide that width of 800 pixels (taking in account of margins) between your #main-wrapper and the #sidebar-wrapper.
That's it!
4 comments:
Hi Compender!
First of all, congrat on your blog!
The simplicity of your language is very appreciated as many of us are not experts as you are and getting down to details as you do make things easy.
But... I'm using Stretch Denim and since November something happened and I can't get the image in the header to stretch to the full width. What's wrong?
Hope you can help...
http://roots4life.blogspot.com
Best regards
#header-inner {
background-position: left ;
margin-left: auto;
margin-right: auto;
width:1024px;
height:133px;
}
h1.title {
padding-top: 38px;
margin: 0 1% .1em;
line-height: 1.2em;
font-size: 100%;
}
h1.title a {
color: $headerTextColor;
text-decoration: none;
}
#header .description {
display: block;
margin: 0 1%;
padding: 0 0 40px;
line-height: 1.4em;
font-size: 50%;
}
/* Content
----------------------------------------------- */
.clear {
clear: both;
}
#content-wrapper {
margin: 0 2%;
padding: 0 0 15px;
text-align: $startSide;
background-color: $mainBgColor;
border: 1px solid $borderColor;
border-top: 0;
}
#main-wrapper {
margin-$startSide: 1%;
width: 64%;
float: $startSide;
background-color: $mainBgColor;
display: inline; /* fix for doubling margin in IE */
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
#sidebar-wrapper {
margin-$endSide: 1%;
width: 29%;
float: $endSide;
background-color: $mainBgColor;
display: inline; /* fix for doubling margin in IE */
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
/* Headings
----------------------------------------------- */
h2, h3 {
margin: 0;
}
Hi Compender
I recently change from a 2 column layout and added a 3rd column. Everything was going perfectly until then but no the header that I had designed on had on the 2 column will not show.
I've uploaded, deleted and reloaded it using every combination that I can think of.
Would you be able to tell me how to get the header to show?
Thanks
http://deweesedesigns.blogspot.com
wow - thanks a gazillion! :)
lydia
www.understandblue.blogspot.com
thanks Compender. I had no idea what you were saying about dividing the pixels, but somehow it turned out alright. Cheers!
Post a Comment