Email: 
Blog contents mailed once daily if updated.
Your email address is never shared
Thanks for visiting! If you're new here, you may want to subscribe to our RSS Feed. This blog posts regular updates about my personal insights, covering about me; my relationships, businesses, finances - whatever you can read about me! Go ahead, subscribe to our feed now! You can also receive updates from this blog via email (more RSS Subscription Options above).

Hacking WordPress Right Margin Problem

May 5th, 2007 by Wai Loong (Add Your Comment)

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

Other Interesting Writings...

Previous Posts:

Newer Posts:

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Insights, Inspirations, Tranquility, Peace and Harmony

Ng Wai Loong

Wai Loong is an electronics engineer by profession. He currently resides in Singapore, a thriving hub at the heart of South-East Asia. When he is not so stress out on the computers or laboratory, he enjoys value reading, jogging at his own pace and blogging in his spare time. Other times, he likes to catch up with some close friends over a cup of latte or teh tarik. As a gift from this friend, you are invited to interact freely with him on his personal blog.

PS: May the person reading this blog transforms his/her businesses, finances, relationships and life for ALL to WIN!