3 replies [Last post]
ColdFire
ColdFire's picture
User offline. Last seen 1 year 22 weeks ago. Offline
newbie
Timezone: GMT-4
Joined: 2010-09-03
Posts: 2
Points: 3

Hi.

My employer created a CSS file with some weird styles that I don't understand. Maybe you can help me? Take for example the following:

body {
	margin: 0;
	padding: 0;
	color: #000;
	background-color: #FFF;
}
* html body {
	text-align: center;
}

Why is the "* html body" style not included with the one above?

Deuce
Deuce's picture
User offline. Last seen 3 days 9 hours ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2005-11-20
Posts: 4416
Points: 1835

it's an IE6 hack... probably

it's an IE6 hack... probably a misconception on how to center a design.

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

ColdFire
ColdFire's picture
User offline. Last seen 1 year 22 weeks ago. Offline
newbie
Timezone: GMT-4
Joined: 2010-09-03
Posts: 2
Points: 3

Interesting! Ok. There must

Interesting! Ok. There must be a better way to deal with this? ...in the interest of the apparent requirement from my employer to still support this very old and broken browser?

Hugo
Hugo's picture
User offline. Last seen 7 hours 58 min ago. Offline
rank Moderator
Moderator
Joined: 2004-06-06
Posts: 15096
Points: 2191

It's a very old hack used to

It's a very old hack used to get around IE in quirks mode being unable to center block elements with auto margins; it is pretty much redundant nowadays.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me