5 replies [Last post]
cluksha
cluksha's picture
Offline
newbie
NH, USA
Last seen: 13 years 9 weeks ago
NH, USA
Timezone: GMT-5
Joined: 2004-03-09
Posts: 5
Points: 0

This all works great in Firefox, but IE is killing me....

This page http://www.sequoyatech.com/pages/Corporate.shtml As you will see it is WRONG.

Can anyone point me in the right direction? I had other width issue it seemed, but those have been taken care of. The css is here....

http://www.sequoyatech.com/css/global.css

http://www.sequoyatech.com/css/subpage.css

Thanks!

TimeBandit
Offline
Enthusiast
Maryland, USA
Last seen: 17 years 21 weeks ago
Maryland, USA
Joined: 2004-09-02
Posts: 112
Points: 0

Margin issues in IE

put this in global.css
* html body { padding: 0; margin: 0 10%; }

cluksha
cluksha's picture
Offline
newbie
NH, USA
Last seen: 13 years 9 weeks ago
NH, USA
Timezone: GMT-5
Joined: 2004-03-09
Posts: 5
Points: 0

How'd you do dat?

Ok - I give. Why in the world did that work?

At least for the container of stuff. Now the mouseover navigation does not fill in the whol space - but I suppose I can work on that Smile

Any ideas are appreciated.

Thanks again that was some "way too cool" css

TimeBandit
Offline
Enthusiast
Maryland, USA
Last seen: 17 years 21 weeks ago
Maryland, USA
Joined: 2004-09-02
Posts: 112
Points: 0

Re: How'd you do dat?

cluksha wrote:
Ok - I give. Why in the world did that work?

It worked because it is a hack for IE. Moz and IE use padding and margin sorta-oppositely in some cases. It's a pain in the you-know-what. Anyway, since you had "body" defined I had to basically redefine it for IE.

to do this you use "* html " [star space html space] in front of the selector and only IE will read it. So you're basically defining that selector for every browser then you're saying "oh by the way IE, i know i just told you to apply such and such to BODY but now I want you to apply this other stuff as well". And you then sorta "undo" what you've done before, pull the old switcheroo on IE.

cluksha wrote:
Now the mouseover navigation does not fill in the whol space - but I suppose I can work on that Smile

Any ideas are appreciated.

ideas would be to set all padding and margins to zero. people yell at me when i suggest this but i always do it first thing when i start a project. why? because there are so many friggin stupid little default settings that a browser imposes if you don't tell it not to. so, right out of the gate, i tell them all to stop with the silliness. only drawback i've found so far is that you need 2 P tags to actually make a parapraph break with space, but i mean you could set this in your css anyway. i just prefer to have the P have no space.

here's my standard css declaration chunk now. i use this in every project, first thing:

/* global */

body, div, p, td, th, li, ul, ol, dd, 
form, select, input, textarea, 
h1, h2, h3, h4, h5, h6, acronym, a { 
	font-family: Verdana, Helvetica, Arial, sans-serif;
	margin: 0px;
	padding: 0px;
	}
form, select, input, textarea	{
	font-size: 11px;
	}
img     { border: 0; }
acronym, abbr	{
	border: none;
	}

ul li	{
	list-style-type: none;
	margin: 0;
	padding: 0;
	}
.skipnav {
	position: absolute;
	visibility: hidden;
	width: 1px;
	height: 1px;
	font-size: 1px;
	line-height: 1px;
	}
.clear {
	clear: both;
	font-size: 1px;
	line-height: 0px;
	}

li.selected a:link, 
li.selected a:visited, 
li.selected a:active { text-decoration: none; }

li.selected ul a:link,
li.selected ul a:visited,
li.selected ul a:active { text-decoration: none; }

Quote:
Thanks again that was some "way too cool" css

you're welcome!

cluksha
cluksha's picture
Offline
newbie
NH, USA
Last seen: 13 years 9 weeks ago
NH, USA
Timezone: GMT-5
Joined: 2004-03-09
Posts: 5
Points: 0

Didn't cut it

That didn't cut t. Although it did make everythingelse on my page go nuts - LOL.

I have even gone so far as to put the padding and margin, individually in each of my elements, UL, LI that needed it.

I am now using this page http://www.sequoyatech.com/testing/pages/Corporate.shtml for testing. The original is live

TimeBandit
Offline
Enthusiast
Maryland, USA
Last seen: 17 years 21 weeks ago
Maryland, USA
Joined: 2004-09-02
Posts: 112
Points: 0

Re: Didn't cut it

cluksha wrote:
That didn't cut t. Although it did make everythingelse on my page go nuts - LOL.

yep, i should've said that, but definitely if you've been relying on each browser's default paddings and margins then when you put that chunk in as i have it above you're going to explode everything else. That's why i said "first thing when i start a project" Wink

It sets many tags' padding and margin to zero, so you'll be changing stuff you've already laboured over. Whether a coder knows it or not, these defaults exist. if you don't set them to zero you'll always have to keep dealing with these mysterious "why is this 5 pixels different here than on this other browser"

It's bad enough you have to deal with stuff like that for IE even after u set defaults to zero.