Hacking Wordpress Right Margin Problem
I use Firefox 2.x and I am often amazed why so many net citizens still use Internet Explorer in spite of its bugs and many vulnerabilities, for example, ActiveX and scripting attacks.
I’m not saying that Firefox is immune but I figured that it’s a lot more secure than any other web browsers that I have used. After all, I’m still a security professional so please pardon my security awareness.
I noticed that most of my visitors are just simply not seeing what I see simply because they are using Internet Explorer 7.x or 6.x! The sidebar of this blog tends to get shifted downwards, after all the blog posts at the bottom are displayed.
Since there are a lot of useful information I put up at the sidebar, I decided to tweak the theme code and hopefully it may solve your problem one day should it arises.
Initially, I couldn’t find answers on exactly what went wrong, so I fired up my favorite browser and search engine (Google) and did a quick search. The only clue I found was at a discussion topic on Wordpress:
[resolved] Right Margin Problems
A few minutes of hacking later and Viola! I’ve got it all straighten out! Below are the modifications I made to get it working nicely.BTW, I’m a geek so I make no apologies for going into the details below.
/* wp-content/themes/unwakeable-1.2/style.css */
#page {
background: white;
text-align: left;
margin: 0 auto;
padding: 20px 0 10px;
position: relative;
width: 785px; /* <- Here is the culprit! */
border: 1px solid #ddd;
border-top: none;
}* html #page { width: 785px } /* <- IE hack also not working */
…
And then further down the same file, you need to match the header to the width of the entire theme:
/* wp-content/themes/unwakeable-1.2/style.css */
#header {
height: 100px;
width: 785px; /* <- Adjust this to match the width above */
color: #fff;
background: #333;
border-left: 1px solid #555;
margin: 0 !important;
}…
That’s it! Mission accomplished!
I would appreciate much if you will drop me a comment when it has saved your day! ![]()
Posted in Geek Hacks

