 | |
05-17-2006, 08:20 AM
|
· #1 | | Account Suspended Name: Bryan Location: Whitewater, WI Join Date: May 2005
Posts: 3,714
NP$: 0.00 ( Donate)
| Good CSS Tip I had a previous problem with the min-height attribute because it works in Firefox but not in IE. There are many solutions out there and some are quite tedious. I found a great hack, although the css won't validate this one thing, but it does save a headache.
#Name
{
min-height:300px;
_height:300px;
}
The min-height works for all browsers except IE and the _height is a hack that no other browsers read but IE respects. So if you need to use a minimum height but you are having troubles, try using the _height hack. |
| |
05-17-2006, 09:55 AM
|
· #2 | | Buy my domains. Name: Dan Join Date: Feb 2006
Posts: 2,800
NP$: 54.00 ( Donate)
| If you want it to validate, you can do: Code: <style type="text/css">
#name {
min-height: 300px;
}
</style>
<!--[if IE]>
<style type="text/css">
#name {
height: 300px;
}
</style>
<![endif]--> |
| |
05-17-2006, 11:57 AM
|
· #3 | | Account Suspended Name: Bryan Location: Whitewater, WI Join Date: May 2005
Posts: 3,714
NP$: 0.00 ( Donate)
| How would you put that in a css file. I don't call CSS in my document but call an actual file. |
| |
05-17-2006, 12:03 PM
|
· #4 | | Buy my domains. Name: Dan Join Date: Feb 2006
Posts: 2,800
NP$: 54.00 ( Donate)
| Code:
<link rel="stylesheet" href="style.css" type="text/css" />
<!--[if IE]>
<link rel="stylesheet" href="iestyle.css" type="text/css" />
<![endif]-->
And in iestyle.css have the IE CSS fixes like width, etc.
Or you could use link rel for normal and use the style tag for the IE stuff. |
| |
05-17-2006, 12:04 PM
|
· #5 | | Account Suspended Name: Bryan Location: Whitewater, WI Join Date: May 2005
Posts: 3,714
NP$: 0.00 ( Donate)
| lol way too much code. Cuz then I will have to load up two seperate files of same size. Thanks for the suggestion. |
| |
05-17-2006, 12:06 PM
|
· #6 | | Buy my domains. Name: Dan Join Date: Feb 2006
Posts: 2,800
NP$: 54.00 ( Donate)
| No, in iestyle.css just put the IE fixes like the height (I meant height in my last post, too.. not width).
The regular stylesheet (style.css) would probably be much larger than iestyle.css |
| |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |