Web Design Forum  

Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 06-28-2011, 12:49 AM   #1
New Member
 
Join Date: Jun 2011
Posts: 1
Default IE9 Center Website Issue

I have designed a website and centered the layout with "<div align="middle">". It works in chrome and firefox but not IE9. What can I do to make this compatible with IE9?

Here's the website: www.nielsonlaw.com

Thanks,
Matt
mdonhau is offline   Reply With Quote
Old 06-28-2011, 01:58 AM   #2
Platinum Member
 
Join Date: Oct 2008
Location: Yonkers, NY
Posts: 512
Default

Hello,

Try adding the following code to your header:

Code:
    <meta http-equiv=”x-ua-compatible” content=”IE=8″>
and then adding this to the very bottom of your .htaccess

Code:
BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support
This should force IE9 to render as if it were in IE8. IE9 has been really buggy for me, and this eliminates all problems that I've had.

-Lou
LouTheDesigner is offline   Reply With Quote
Old 06-29-2011, 03:32 AM   #3
New Member
 
Join Date: Jun 2011
Posts: 8
Default

Quote:
Originally Posted by LouTheDesigner View Post
Hello,

Try adding the following code to your header:

Code:
    <meta http-equiv=”x-ua-compatible” content=”IE=8″>
and then adding this to the very bottom of your .htaccess

Code:
BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support
This should force IE9 to render as if it were in IE8. IE9 has been really buggy for me, and this eliminates all problems that I've had.

-Lou

Great info for us casual designers....Will put this in my reference book. Thanks.
Big Secz is offline   Reply With Quote
Old 06-29-2011, 03:47 PM   #4
Super Moderator
 
PixelPusher's Avatar
 
Join Date: Oct 2008
Location: Arizona, USA
Posts: 1,092
Default

My suggestions:
  1. Ditch the align attribute, use css instead. It's much more efficient and more widely compatible.
  2. In your situation, remove the outer div all together. It's not needed.
  3. Use external stylesheets. Link to them in the head of the page.

External Stylesheets
HTML Code:
...
<head>
<link href="stylesheet_location" type="text/css" rel="stylesheet"/>
</head>
...
Add this to your body_wrapper div:
Code:
div#body_wrapper {
    font-size: 0.71em;
    margin: 35px auto; /* use auto to center. Requires a defined width */
    width: 982px;
}
__________________
John Darling
Graphic / Web Designer / Front-end Developer
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
jsdarling.com
PixelPusher is offline   Reply With Quote
Old 08-01-2011, 04:46 AM   #5
Bronze Member
 
Join Date: Jul 2011
Location: Vista, CA
Posts: 65
Send a message via MSN to Janja Send a message via Skype™ to Janja
Default

What John said, but also don't forget to text-align:center for your body tag. Then you can change your text-align to left again in the body_wrapper.
Otherwise it still might not work in IE.
__________________
JANJAWATSON
www.jewel-webdesign.com
Janja is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.