7 replies [Last post]
Benny X
Offline
newbie
The Netherlands
Last seen: 18 years 43 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-01-29
Posts: 6
Points: 0

First of all, i want to thank everyone. I have learned much from this forum so far.

I have been browsing this forum for the last few days and i have found some great solutions, but there is still one problem i can't figure out.

First things first:

This is my site: http://bennyx.freeshell.org
This is my css: http://bennyx.freeshell.org/dal.css

The attached picture shows my problem in IE 5.x All other browsers are ok. I checked against latest firefox, opera and ie6.

I (think) i have tried everything, moving the padding/margin outside in another box (it helped a bit), adding he/ight hack and more stuff i can't remember right now, but no go for some reason. Only thing that works is adding #main {height: 100%;} in the html but then some other bug in ie6 is triggered. ie6 thinks that 100% is the height of the screen instead of the length it needs.

Strange thing is that pages that are shorter than the floating menu, and have height: 270px in the html show ok. When adding a height in the html larger than the floating menu it doesn't work. I'd rather not do that anyway because every page is a different length, and i need to change that every time something is added. I only need it for pages that are (still) shorter than the floating menu.

I hope i was clear enough. I have been wrestling with this for 2 days now and it's giving me a headache.

I hope it's something small i am doing wrong, cause i can't see it right now.

Regards,
Benny

Bigdawg
Offline
Enthusiast
Last seen: 18 years 50 weeks ago
Joined: 2003-12-16
Posts: 65
Points: 0

Now it is time to ask. IE5.x is driving me nuts.

Looks nice, normally I do not like sites that read across the entire screen but yours looks clean and the colors are nice. Normally it is something small that after looking at so long you just do not see so a fresh pair of eyes are good. I do not have IE 5.5 so can not help, good luck.

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

Now it is time to ask. IE5.x is driving me nuts.

try the holly hack to change the height for IE5.x only. it looks like

/* Hide from IE5-mac. Only IE-win sees this. \*/
* html #main{  //for IE only
     height: 100%; //for IE5 only
     h/eight: 0%; //for IE6
/* End hide from IE5/mac */
}

This throws off IE/MAC so you might have to surround that code with the MAC hack if you want it to show in MAC

Also, if you don't want to make height 100%, try a height of 1% first. This makes IE5 think it's dimensioned but only enough to fill the container with the contents.

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

Benny X
Offline
newbie
The Netherlands
Last seen: 18 years 43 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-01-29
Posts: 6
Points: 0

Now it is time to ask. IE5.x is driving me nuts.

Maks wrote:
try the holly hack to change the height for IE5.x only. it looks like

/* Hide from IE5-mac. Only IE-win sees this. \*/
* html #main{  //for IE only
     height: 100%; //for IE5 only
     h/eight: 0%; //for IE6
/* End hide from IE5/mac */
}

I tried that holly hack last night, and again this morning and after some changes it now works. Smile

my working css now looks like

#main {
 border: 2px solid black;
 background: rgb(236,233,213);
 padding-left: 15px;
 padding-right: 15px;
 padding-bottom: 15px;
}

* html #main {
  height: 0%;
  h/eight: 100%;
} 

I don't know what i did wrong earlier, but i was really under the impression that i already tried this. As you can see i only swapped the two values in the * html #main part from your code in my code.

Maks wrote:
This throws off IE/MAC so you might have to surround that code with the MAC hack if you want it to show in MAC

I'd probably better not do that. I don't have access to IE/MAC so maybe i'll be breaking more stuff than fixing it.

Thanks for your help and pointing me in the right direction again.

Benny X
Offline
newbie
The Netherlands
Last seen: 18 years 43 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-01-29
Posts: 6
Points: 0

Now it is time to ask. IE5.x is driving me nuts.

Bigdawg wrote:
Looks nice, normally I do not like sites that read across the entire screen but yours looks clean and the colors are nice.

Thanks for the heads up.

Bigdawg wrote:
I do not have IE 5.5 so can not help, good luck.

I had that same problem until a while back, unable to check my own site with different browser versions. Now i'm using microsoft virtual pc and have different os's installed with naturally different browser versions. It works real clean and nice.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 4 years 3 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Now it is time to ask. IE5.x is driving me nuts.

Maks wrote:
/* Hide from IE5-mac. Only IE-win sees this. \*/
* html #main{  //for IE only
     height: 100%; //for IE5 only
     h/eight: 0%; //for IE6
/* End hide from IE5/mac */
}

Hi Maks

I hate to say this, but you have some errors with that code, it SHOULD look like this:

/* Hide from IE5-mac. Only IE-win sees this. \*/
* html #main{
height: 100%;
he\ight: 0%;
}
/* End hide from IE5/mac */

What was wrong?

  • in the * html line you tried to put a comment using //... The only way to make a comment in style is to use /* ... */, but you can't put a comment inside the Mac Hack
  • In the iE6 hack of height, you use the wrong slash (/) whereas it should be \. Also, this must not go in front of a valid hex character (0-9, a-f), so it must go in front of the i. Also, it cannot be in front of the first character.
  • You ended the Mac Hack before the end curly brace, meaning IE mac will see that, not having seen the start brce. The stylesheet will be broken by that.

    Hey ho.

    Trevor

Benny X
Offline
newbie
The Netherlands
Last seen: 18 years 43 weeks ago
The Netherlands
Timezone: GMT+1
Joined: 2004-01-29
Posts: 6
Points: 0

Now it is time to ask. IE5.x is driving me nuts.

ClevaTreva wrote:

I hate to say this, but you have some errors with that code, it SHOULD look like this:

/* Hide from IE5-mac. Only IE-win sees this. \*/ 
* html #main{ 
height: 100%; 
he\ight: 0%; 
} 
/* End hide from IE5/mac */


What was wrong?

  • in the * html line you tried to put a comment using //... The only way to make a comment in style is to use /* ... */, but you can't put a comment inside the Mac Hack
  • In the iE6 hack of height, you use the wrong slash (/) whereas it should be \. Also, this must not go in front of a valid hex character (0-9, a-f), so it must go in front of the i. Also, it cannot be in front of the first character.
  • You ended the Mac Hack before the end curly brace, meaning IE mac will see that, not having seen the start brce. The stylesheet will be broken by that. Trevor


Thanks Trevor, although the reply was not directed to me, i updated my css code like this:

 
#main { 
 border: 2px solid black; 
 background: rgb(236,233,213); 
 padding-left: 15px; 
 padding-right: 15px; 
 padding-bottom: 15px; 
} 
 
/* Hide from IE5-mac. Only IE-win sees this. \*/ 
* html #main { 
  height: 0%; 
  he\ight: 100%; 
} 
/* End hide from IE5/mac */ 

Now it validates ok, and *probably* looks good in IE/Mac, can't check unfortunately.

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

Now it is time to ask. IE5.x is driving me nuts.

ClevaTreva wrote:

What was wrong?

  • in the * html line you tried to put a comment using //... The only way to make a comment in style is to use /* ... */, but you can't put a comment inside the Mac Hack
  • In the iE6 hack of height, you use the wrong slash (/) whereas it should be \. Also, this must not go in front of a valid hex character (0-9, a-f), so it must go in front of the i. Also, it cannot be in front of the first character.
  • You ended the Mac Hack before the end curly brace, meaning IE mac will see that, not having seen the start brce. The stylesheet will be broken by that.

    Hey ho.

    Trevor

    Thanks Trevor. I'm new enough to CSS where I might wanna check my own code and make sure I didn't do something wrong myself. I don't mind learning. I'm glad you got the help you needed Benny. Hey ho, out.

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