3 replies [Last post]
ColdFire
ColdFire's picture
User offline. Last seen 1 year 37 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 4 weeks 4 days ago. Offline
rank Guru
Guru
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4421
Points: 1840

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 37 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 16 hours 23 min ago. Offline
rank Moderator
Moderator
Timezone: GMT+1
Joined: 2004-06-06
Posts: 15197
Points: 2300

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