ie Q?

liunx

Guest
* html #idname {
attributes:
}

the * html part is an ie hack where that code will only work for IE, right? or am i totally off? thxor html * #idname

Why hack?That's correct. Note that often this hack makes MacIE5.2 display incorrectly, so wrap the IE hack with the Mac5 hack. Th septmeber techniques article on my site gives details on this if u need it.Keep in mind that the html * hack mentioned is invalid CSS.Originally posted by Fang
or html * #idname

Why hack?

look at: <!-- m --><a class="postlink" href="http://www.moonshotstudios.com/contract.html">http://www.moonshotstudios.com/contract.html</a><!-- m -->
in IE. The borders part is all screwed up. im going to try to fix that. If anyone has suggestions pls share i would love to know ! :POriginally posted by TimeBandit
That's correct. Note that often this hack makes MacIE5.2 display incorrectly, so wrap the IE hack with the Mac5 hack. Th septmeber techniques article on my site gives details on this if u need it.

what do u mean? im lost there :P thxOriginally posted by Jona
Keep in mind that the html * hack mentioned is invalid CSS.

ok, is there something to use that is valid? or just live w/ it? thx :)Well since IE doesn;t support child selectors a good one to use is this:#something{
style:IE;
}
html>body #something{
style:standard;
}Originally posted by pawky
what do u mean? im lost there :P thx

The September article on my site talks about this. I've been posting this info a bunch and was just tired of typing so i mmade it this month's article... ;) So go to the site in my sig and go to the September article in web techniques. Jesus my typing is bad today...

If you're still having trouble with the Mac hack after reading the article, lemme know.Originally posted by pawky
ok, is there something to use that is valid? or just live w/ it? thx :)

"* html #whatever"
validates at w3.org

I believe the non-validating one is "html *" In any case, my CSS for my site validates and it definitely contains the IE "* html" and the Mac hack. i wouldn't put 100% faith in validation anyway. It's a GREAT place to start but it's not an end point for me. Frankly I want to use absmiddle when I please, but that bugger always invalidates a page for, what I feel, isn't a great reason. But that's another topic...I would have thought that both "html *" and "* html" would be valid, because the * means any element.

Therefore "html *" would mean any element inside the <html> tag and "* html" would mean an <html> tag inside any element (although this should NEVER happen).I remember using the "* html" hack, validating my CSS, and finding that it is invalid. (The error was odd, though - something about line 0.)Just checked...

* html { }

...and...

html * { }

...are both valid.Hm, well I replaced it with the html>body hack, and my stylesheet validated. Maybe it threw an error because of where it was located in the code, or something. But I do know that it said it was invalid until I removed it. Ah well...thx all for the replies, they have all helped :DMissed this:
maxlength="5" tabindex="7" id="personal_address_zip"
and no charset.

The css looks bad in IE due to the negative margins and the use of span.
This gives the "same" result in Moz., IE, and Opera.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>form layout</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
form {
margin : 10px auto;
font : normal bold 14px/18px "Times New Roman", serif;
text-indent : 0;
width : 780px;
border : 1px solid #dcdcdc;
}
form legend {
color : #8e0009;
}
form #topleft {
float : left;
width : 340px;
height : 195px;
border : 2px solid #000;
padding : 0 20px;
}
form input , form textarea , form select {
font : normal 14px/18px "Times New Roman", serif;
margin : 0 0 0 5px;
background : #f0f0f0;
text-indent : 3px;
border : 0;
border-bottom : 2px solid #000;
}
#topleft label {
margin:6px;
float:left;
}
#topleft input {
margin:6px 2px;
float:right;
}
#topleft p {
clear:both;
margin:0;
}
-->
</style>

</head>
<body>
<form>
<fieldset id="topleft"> <!-- top left -->
<legend>Personal Information</legend>
<p><label for="personal_lname">Name:</label><input type="text" name="name" value="Last" size="10" tabindex="1" id="personal_lname" onfocus="if (this.value == 'Last') { this.value = ''; }"> <input type="text" name="name" value="First" size="10" tabindex="2" id="personal_fname" onfocus="if (this.value == 'First') { this.value = ''; }"> <input type="text" name="name" value="M" size="2" maxlength="1" tabindex="3" id="personal_mname" onfocus="if (this.value == 'M') { this.value = ''; }"></p>
<p><label for="personal_address">Address:</label> <input type="text" name="address" value="Mailing Address" size="25" maxlength="25" tabindex="4" id="personal_address" onfocus="if (this.value == 'Mailing Address') { this.value = ''; }"></p>
<p><input type="text" name="address" value="City" size="20" maxlength="25" tabindex="5" id="personal_address_city" onfocus="if (this.value == 'City') { this.value = ''; }"> <input type="text" name="address" value="St" size="3" maxlength="2" tabindex="6" id="personal_address_state" onfocus="if (this.value == 'St') { this.value = ''; }"> <input type="text" name="address" value="Zip" size="5" maxlength="5" tabindex="7" id="personal_address_zip" onfocus="if (this.value == 'Zip') { this.value = ''; }"></p>
<p><label for="personal_phone">Phone #:</label><input type="text" name="phone" value="(xxx)xxx xxxx" size="15" maxlength="13" tabindex="8" id="personal_phone" onfocus="if (this.value == '(xxx)xxx xxxx') { this.value = ''; }"></p>
<p><label for="personal_email">E-mail: (optional)</label> <input type="text" name="email" size="30" tabindex="9" id="personal_email"></p>
</fieldset>
</form>
</body>
</html>awesome! thx ill look at that later today and let ya know how it does :D thx again
 
Back
Top