Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Centre align a website

Featured Replies

Hello,

 

I have a slight issue. I am creating a website and wish for it to site within the centre of the browser. I have managed to do this for all browsers except IE5.5

 

Anyone know how I can centre align a website for IE5.5

There is a hack for this which involves setting the text-align property to center in IE5.5 and then over-riding that in every other div. I think.

 

So:

 

#wrapper {
margin: 0 auto; /*for the decent browsers*/
text-align: center; /*for IE5.5/*
width: 800px; /*or whatever*/
}

 

Should center it. Then you just need to add text-align: left; to each other div to put the text back to the left side.

http://www.webdesignerforum.co.uk/topic/2478-how-to-center-a-site-using-css/

 

But seriously... why cater for 5.5? I know a lot of people still use IE6 - but how many use 5.5?

 

I would just use some conditional comments which state:

 

*If you are viewing this site in IE5.5 or lower then you are clearly a bloody moron who doesn't deserve to breathe the same air as normal human being - upgrade your browser to at LEAST IE8 and get with the times.*

 

Do it ;)

I agree with terydinho, but if the fix is as easy as is it, then you might as well do it, no? I would not spend any considerable time with IE5.5, but a 5 minute fix like that is worth it, in my opinion.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.