/    Sign up×
Community /Pin to ProfileBookmark

  • * html #idname {
    attributes:
    }
  • the * html part is an ie hack where that code will only work for IE, right? or am i totally off? thx

    to post a comment
    CSS

    16 Comments(s)

    Copy linkTweet thisAlerts:
    @FangSep 05.2004 — or html * #idname

    Why hack?
    Copy linkTweet thisAlerts:
    @TimeBanditSep 05.2004 — 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.
    Copy linkTweet thisAlerts:
    @JonaSep 05.2004 — [font=trebuchet ms]Keep in mind that the html * hack mentioned is invalid CSS.[/font]
    Copy linkTweet thisAlerts:
    @pawkyauthorSep 06.2004 — [i]Originally posted by Fang [/i]

    [B]or html * #idname



    Why hack? [/B]
    [/QUOTE]


    look at: http://www.moonshotstudios.com/contract.html

    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 ! ?
    Copy linkTweet thisAlerts:
    @pawkyauthorSep 06.2004 — [i]Originally posted by TimeBandit [/i]

    [B]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. [/B][/QUOTE]


    what do u mean? im lost there ? thx
    Copy linkTweet thisAlerts:
    @pawkyauthorSep 06.2004 — [i]Originally posted by Jona [/i]

    [B][font=trebuchet ms]Keep in mind that the html * hack mentioned is invalid CSS.[/font] [/B][/QUOTE]


    ok, is there something to use that is valid? or just live w/ it? thx ?
    Copy linkTweet thisAlerts:
    @David_HarrisonSep 06.2004 — Well since IE doesn;t support child selectors a good one to use is this:#something{
    style:IE;
    }
    html>body #something{
    style:standard;
    }
    Copy linkTweet thisAlerts:
    @TimeBanditSep 06.2004 — [i]Originally posted by pawky [/i]

    [B]what do u mean? im lost there ? thx [/B][/QUOTE]


    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.
    Copy linkTweet thisAlerts:
    @TimeBanditSep 06.2004 — [i]Originally posted by pawky [/i]

    [B]ok, is there something to use that is valid? or just live w/ it? thx ? [/B][/QUOTE]


    "* 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...
    Copy linkTweet thisAlerts:
    @David_HarrisonSep 06.2004 — 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).
    Copy linkTweet thisAlerts:
    @JonaSep 06.2004 — [font=trebuchet ms]I remember using the "* html" hack, validating my CSS, and finding that it is invalid. (The error was odd, though - something about line 0.)[/font]
    Copy linkTweet thisAlerts:
    @Jeff_MottSep 06.2004 — Just checked...

    [font=courier]* html { }[/font]

    ...and...

    [font=courier]html * { }[/font]

    ...are both valid.
    Copy linkTweet thisAlerts:
    @JonaSep 06.2004 — [font=trebuchet ms]Hm, well I replaced it with the [/font][font=courier new]html>body[/font][font=trebuchet ms] 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...[/font]
    Copy linkTweet thisAlerts:
    @pawkyauthorSep 06.2004 — thx all for the replies, they have all helped ?
    Copy linkTweet thisAlerts:
    @FangSep 06.2004 — Missed this:
    maxlength="5[COLOR=red]"[/COLOR] tabindex="7[COLOR=red]"[/COLOR] id="personal_address_zip"
    and no [I]charset[/I].

    The css looks bad in IE due to the negative margins and the use of [I]span[/I].

    This gives the "same" result in Moz., IE, and Opera.
    &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd"&gt;
    &lt;html lang="en"&gt;
    &lt;head&gt;
    &lt;title&gt;form layout&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
    &lt;style type="text/css"&gt;
    &lt;!--
    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;
    }
    --&gt;
    &lt;/style&gt;

    &lt;/head&gt;
    &lt;body&gt;
    &lt;form&gt;
    &lt;fieldset id="topleft"&gt; &lt;!-- top left --&gt;
    &lt;legend&gt;Personal Information&lt;/legend&gt;
    &lt;p&gt;&lt;label for="personal_lname"&gt;Name:&lt;/label&gt;&lt;input type="text" name="name" value="Last" size="10" tabindex="1" id="personal_lname" onfocus="if (this.value == 'Last') { this.value = ''; }"&gt; &lt;input type="text" name="name" value="First" size="10" tabindex="2" id="personal_fname" onfocus="if (this.value == 'First') { this.value = ''; }"&gt; &lt;input type="text" name="name" value="M" size="2" maxlength="1" tabindex="3" id="personal_mname" onfocus="if (this.value == 'M') { this.value = ''; }"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;label for="personal_address"&gt;Address:&lt;/label&gt; &lt;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 = ''; }"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input type="text" name="address" value="City" size="20" maxlength="25" tabindex="5" id="personal_address_city" onfocus="if (this.value == 'City') { this.value = ''; }"&gt; &lt;input type="text" name="address" value="St" size="3" maxlength="2" tabindex="6" id="personal_address_state" onfocus="if (this.value == 'St') { this.value = ''; }"&gt; &lt;input type="text" name="address" value="Zip" size="5" maxlength="5" tabindex="7" id="personal_address_zip" onfocus="if (this.value == 'Zip') { this.value = ''; }"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;label for="personal_phone"&gt;Phone #:&lt;/label&gt;&lt;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 = ''; }"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;label for="personal_email"&gt;E-mail: (optional)&lt;/label&gt; &lt;input type="text" name="email" size="30" tabindex="9" id="personal_email"&gt;&lt;/p&gt;
    &lt;/fieldset&gt;
    &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    Copy linkTweet thisAlerts:
    @pawkyauthorSep 06.2004 — awesome! thx ill look at that later today and let ya know how it does ? thx again
    ×

    Success!

    Help @pawky spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...