Dotwebs Internet Solutions

IE 6 Double Margin Fix

June 29, 2009

I hear a lot of talk on Twitter and the bloggosphere about rendering issues in IE6 * and in my experience the most common one is the double margin problem.

Let’s say, for example, you have a container div with a width of 900 pixels:

#container {
width: 900px;
}

Then you have two inner divs which go side by side, like so:

#lnav {
width: 126px;
padding-right: 12px;
padding-left: 12px;
float: left;
}

#maincontent {
width: 670px;
padding-right: 45px;
margin-left: 35px;
float: left;
}

This will display fine in most browsers but for IE 6 you need to add ‘display:inline‘ :

#maincontent {
width: 670px;
padding-right: 45px;
margin-left: 35px;
float: left;
display: inline:
}


Simple! I don’t know why or how this works, but it does. If you have more nested divs, try adding the ‘display: inline’ to these as well and keep checking in IE6 until it looks right.

Once you have your general layout displaying correctly, your battle with IE6, in my opinion, is mostly over.  When it comes to dropdown menus and AJAX  * scripts, these are more difficult to get right across all browsers, especially if you are using browser shots to see how your page is rendering and not actually testing in all browsers.

As a general rule, it is safe to assume that your scripts will not work in all browsers, so as well as using scripts that degrade well in older browsers, it is good practise to provide an alternative text-only version.

hr

Filed under: How to, Web Design | Comments (0)



5 Useful Plug-ins for WordPress

June 25, 2009

In my previous post 5 Essential Plug-ins for WordPress I listed some pretty basic ones that I wouldn’t put a WP site live without.

This next round-up is a list of useful but not really essential plug-ins.

wordpress-logo

Many thanks to Grandad for suggesting most of these:

1. Subscribe To Comments by Mark Jaquith

Subscribe to Comments is a robust plugin that enables commenters to sign up for e-mail notification of subsequent entries.

2. WP Ajax Edit Comments by Ajay, ronalfy

WP Ajax Edit Comments  allows users and admins to edit comments on a post. Users can edit their own comments for a limited time, while admins can edit all comments.

3. WP Super Cache by Donncha O Caoimh

This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.

4. WP-SpamFree by Scott Allen

An extremely powerful WordPress anti-spam plugin that eliminates blog comment spam, including trackback and pingback spam.

5.  TinyMCE Advanced by Andrew Ozz

Enables advanced features and plugins in TinyMCE such as insert layers & tables (let’s face it, we still sometimes need tables!), add your own CSS  *.

hr

Filed under: Blogging, General Stuff, How to | Comments (0)