star html hack is gone? No problem! New IE7 hack is here!

I was designing a WordPress theme today. I’ve joint ventured with a great designer and we’re starting up ThemesCrunch.com which will be launching anytime soon. That’s a story I’m keeping for another day. Lets talk about the topic that got you here first.

If you found this post via google search, its likely you already know about the holly hack which uses star html code to fix a jog in IE7 browsers. Here is an example. You have a floating div which is drifted 3 pixels to the top. The normal code would be:

.boxclass {
margin: 0px;
padding: 0px;
border: 1px solid #fff;
width: 300px;
height: 300px; /* We want to change this to 303px to make the box look fine in IE */
}

So we used to apply the holly hack which would be:
.boxclass {
margin: 0px;
padding: 0px;
border: 1px solid #fff;
width: 300px;
height: 300px; /* We want to change this to 303px to make the box look fine in IE */
}
* html .boxclass {
height: 303px;
}

The extended code AFTER the main element will override the actual code and fix the problem. BUT! This was just until Microsoft fixed the hack as stated by PositionIsEverything. No wonder it was not working for me as I was coding my design. I was thinking of bypassing it using the conditional comments and make a hack using a separate CSS file using the following code:

but I felt like playing around with the CSS a little bit more. And guess what? I found another fix for this. Believe me, its very simple! Lets say we have the first code in this post as the actual code and we want to add extra 3 pixels to the height property. What do we do? Trust me, you will laugh at this one.

.boxclass {
height: 303px; /* Add this element that you want to change */
}; /* and add this semicolon at the end AFTER the element closure. The shahz hack! muahaha */

.boxclass {
margin: 0px;
padding: 0px;
border: 1px solid #fff;
width: 300px;
height: 300px; /* This will only be used by non-IE browsers */
}

That’s it..The problem is fixed..The thing that you need to keep in mind is, the IE tag must always be ABOVE the actual code..What I have seen is that IE bypasses the code after the semicolon but this is not the case for the other browsers..I’ve tested on Opera 9.6 and FireFox 3 which is not affected at all. Try it out. If you want to discuss it, please do so in the comments box. I love exchanging opinions and ideas :)

Regards,
shahz

Print
  1. Big John
    #1 written by Big John  (9 years ago)

    Shahz, I guess this does make it possible to css-hack for IE, but I’ve been burned before like this. It seems a bit risky to go back to css hacks after the safety of CC’s, but if someone wants to take that chance, well…

    I also wonder if other browsers will remain stable in this case or might suddenly stop parsing the css like IE.

  2. ShahZ
    #2 written by ShahZ  (9 years ago)

    Big John!
    Its a pleasure to have you here! I didnt expect to get a reply from you though. I’ve learn’t most of IE hacks from your site! Well, I tested out the code just recently. It appears that after IE bypasses the element after the semicolon, it continues reading the rest of the CSS file! Give it a shot Big John! I’d love to see this becoming another theory of fixing CSS. You’re well known in identifying these hacks.

    Respects! Thank you for posting a comment..

  3. call of duty ghosts hack,call of duty ghosts hack download,call of duty ghosts hack tool,call of duty ghosts wallhack,call of duty ghosts aimbot,call of duty ghosts prestige hack

    You happen to be is a outstanding site owner. The site reloading swiftness is actually wonderful. It seems that you’re undertaking any one of a kind technique. Furthermore, Your material are masterwork. you might have done a fantastic process with this issue!

  4. Www.Youtube.Com
    #4 written by Www.Youtube.Com (4 years ago)

    Mind you, I still do fairly well in most of these matches,
    normally sitting in 1st or 2nd place on my team (winning or losing), but I
    have that feeling like it’s not really satisfying anymore.
    Them represents considerably being any testament for the going through
    electrical power regarding the phone call associated with task franchise,
    strong uniqueness within the big specialist video
    gaming group, however delivers more from a challenge versus
    it can an explanation on observe. They all, in turn, show their efficacy brining mind-blowing games that one cannot forget once played.

  5. youtube.com
    #5 written by youtube.com (4 years ago)

    The upcoming DLC packs will be arriving first on the Xbox platforms.

    Them represents considerably being any testament for the going
    through electrical power regarding the phone call associated with
    task franchise, strong uniqueness within the big
    specialist video gaming group, however delivers more from a
    challenge versus it can an explanation on observe.
    They all, in turn, show their efficacy brining mind-blowing games that one cannot forget once played.

  6. Barb
    #6 written by Barb (4 years ago)

    Union Cemetery’s claim to fame is the white
    lady who haunts the road near the graves. Them represents considerably being any
    testament for the going through electrical power
    regarding the phone call associated with task franchise, strong uniqueness
    within the big specialist video gaming group, however delivers more from a challenge versus it can
    an explanation on observe. One of the fans of the video game mentioned that you simply have to reset
    the system before then or any over save points in order to get rid of the
    cash handouts from the hackers.

  7. cod Ghosts Hack
    #7 written by cod Ghosts Hack (4 years ago)

    22, the studio provided some hints at what to expect in future
    patches. They do a lot of talking, but when it all comes down to it, you could at least hope that they’d
    kill someone. ‘ He also wanted to know if the Free Fall
    multiplayer map, which was a free pre-order bonus, would also be added into the
    rotation for players playing under hardcore settings.

    Here is my web-site; cod Ghosts Hack

  8. Www.Youtube.Com
    #8 written by Www.Youtube.Com (4 years ago)

    The video below taken from You – Tube shows exactly what
    it looks like when a lag switch is being used and what you
    would see on your kill cam if you are killed by someone using one on
    Call of Duty 4: Modern Warfare. John Widders the family’s chauffer’s also died in the Houghton Mansion.
    ‘ He also wanted to know if the Free Fall multiplayer map,
    which was a free pre-order bonus, would also
    be added into the rotation for players playing under hardcore settings.

    My blog; Cod Ghosts Hack (http://Www.Youtube.Com)

  9. call of duty ghosts Hack
    #9 written by call of duty ghosts Hack (4 years ago)

    They tend to make bizarre and frightening noises when killed however, making you
    wish you could just mute the awful wailing that causes
    banshees to cringe. Well, some do little junior,
    but we certainly don’t make it a point of injecting one colorful expletive after another between every word.
    A report will also be sent to Microsoft, Nintendo, Sony and Steam for further actions.

    my weblog: call of duty ghosts Hack

  10. cod ghosts season Pass dlc
    #10 written by cod ghosts season Pass dlc (4 years ago)

    No spread -lets your weapon target firing
    into one direction leaving no shake at your screen. Scientists have yet to find a source of this phenomenon.
    Knife automatically the gamers -instantly
    kill players together with your knife.

    Stop by my webpage cod ghosts season Pass dlc

  11. cheap origin keys
    #11 written by cheap origin keys (4 years ago)

    I just couldn’t go away your web site prior to suggesting that I extremely loved
    the usual info an individual provide for your guests? Is gonna be again ceaselessly to
    inspect new posts

  12. rent
    #12 written by rent  (4 years ago)

    Excellent blog right here! Additionally your
    website loads up very fast! What host are you the usage of?

    Can I am getting your affiliate hyperlink on your host?

    I desire my website loaded up as fast as yours lol

  13. You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  14. Comment Feed for this Post
Go to Top