5 replies [Last post]
raven11
Offline
newbie
Last seen: 18 years 14 weeks ago
Joined: 2004-06-17
Posts: 5
Points: 0

Well, after a few hours of trying to figure out the problem, I'm coming here because I'm tired of looking at the code.

In Firefox the page renders pretty much how I want it to (with a few minor bugs). But in IE 6, the divs in the content area get all messed up.

Any help would be much appreciated!

Here are the pertinent links:
http://www.wwta.org/test/index2.asp
http://www.wwta.org/test/styles3.css
http://www.wwta.org/test/front2.css

Jhorra
Offline
Enthusiast
Last seen: 14 years 42 weeks ago
Joined: 2004-06-04
Posts: 57
Points: 0

IE kicks my butt - div problem

I'm almost sure it has to do with how you are setting the widths. Mozilla takes the width as you put it and includes the borders inside that width. IE takes the width and adds the border width on top of it. There is a minor hack that fixes it, but I don't know specifically what it is.

raven11
Offline
newbie
Last seen: 18 years 14 weeks ago
Joined: 2004-06-17
Posts: 5
Points: 0

IE kicks my butt - div problem

Hmmm... I thought I took that all into account. I've used the Box Model Hack (I think that's what you're talking about), but maybe I screwed up the width somewhere. I'll look into it.

Thanks for the feedback!

Maks
Offline
Regular
Afghanistan
Last seen: 18 years 20 weeks ago
Afghanistan
Joined: 2004-05-08
Posts: 21
Points: 0

IE kicks my butt - div problem

This is the full hack. I'll explain it below the code.

/* Hides from IE-mac \*/
* html div#divname {
	width: 912px;
	w\idth: 612px;
	margin-left: 300px;
	ma\rgin-left: 100px;
}
/* End hide from IE-mac */ 
 

the first line is a hack to preven IE/MAC from seeing it since we're isolating IE/WIN.

second line starts the div we only want IE to see.

third line both IE5.x and IE6 sees the properties(isolates IE5 when used with fourth line)

fourth line only IE6 sees the property, overwrites previous width(isolates IE6). Notice the backslash is after the "a" in ma\rgin-width on line 6? The backslash must not come just before any of the first six alphabetical characters, and must be in the property name.

That's the tan hack! check this site out for more info.
http://www.positioniseverything.net/articles/box-model.html

When strong, feign weakness
When weak, feign strength
When on deadly ground, Fight!

raven11
Offline
newbie
Last seen: 18 years 14 weeks ago
Joined: 2004-06-17
Posts: 5
Points: 0

IE kicks my butt - div problem

Maks - thanks for getting me up to speed on the Tan Hack!

Unfortunately that did not seem to solve the problem. It must be something else. Anyone have any ideas?

Jhorra
Offline
Enthusiast
Last seen: 14 years 42 weeks ago
Joined: 2004-06-04
Posts: 57
Points: 0

IE kicks my butt - div problem

The other thing that throws it off is if you have a word or something that makes it go past the set width. It causes it to fall below, though I don't know why it would do it in one browser and not the other.