Absolute Postion and Cross Browser

CaldwellYSR

Member
I have the perfect solution for IE. First in the <head> of your html you put

HTML:
<!--[if lt IE9 ]>
  <script type="text/javascript">
    window.location = 'ie.html';
  </script> 
<![endif]-->

then your ie.html looks like this.

HTML:
<!DOCTYPE html>
<html>
<head>
  <title>Internet Explorer Sucks!</title>
  <script>
    alert("I'm terribly sorry but your browser isn't up to web standards. Please visit on of the following links for a better browser");
  </script>
</head>
<body>
  <h2>I'm terribly sorry but your browser isn't up to web standards. Please visit on of the following links for a better browser</h2>
  <ul>
    <li><a href="http://www.mozilla.com/en-US/firefox/new/">Mozilla Firefox</a></li>
    <li><a href="http://www.google.com/chrome/">Google Chrome</a></li>
    <li><a href="http://www.opera.com/">Opera</a></li>
    <li><a href="http://www.apple.com/safari/">Safari</a></li>
  </ul>
</body>
</html>

Of course this doesn't work for people using IE and not using javascript but let's be honest if you're using IE and javascript is disabled then you probably are too technologically retarded to read the web page anyways so it's not worth worrying about all 5 of those people that will be visiting your site.
 

CaldwellYSR

Member
Yes that's exactly what it does! :)

It's a joke answer because I'm sure that's not what you wanted but it's what I do.
 

CaldwellYSR

Member
I use it on my site because I have alot of absolute positioning. Plus I pretty much refuse to build for anything less than IE 9.
 

PixelPusher

Super Moderator
Staff member
First off, avoiding a problem is NOT solving it.
IE can be awkward, yes, but a skilled designer/front dev knows how to overcome this challenge :cool:

I agree with the accepted response on Yahoo Answers and recommend using conditional statements. I'm curious though, is the the difference that significant that it requires all this attention? Do you have a link to the site? And lastly, why are you using AP (absolute position) for your headings?
 

Janja

New Member
IE will have a default margin. I usually put this code into my style sheet at the top, so I can reset all default margins. That way, I have all the control over each element in my css. Hope that helps.

html, body, div, span, applet, object, iframe, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, hr, {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
}
 
Last edited:

mjrzasa

New Member
Interesting, but doesn't body {margin: 0;
padding: 0;
border: 0;
font-size: 100%;}
do all that since the entire page is within <body> </body> ?
 

CaldwellYSR

Member
First off, avoiding a problem is NOT solving it.
IE can be awkward, yes, but a skilled designer/front dev knows how to overcome this challenge :cool:

I agree with the accepted response on Yahoo Answers and recommend using conditional statements. I'm curious though, is the the difference that significant that it requires all this attention? Do you have a link to the site? And lastly, why are you using AP (absolute position) for your headings?

In this case if everyone avoided the problem then maybe people would stop using IE and/or Microsoft would fix their browser.
 

Phreaddee

Super Moderator
Staff member
Although in theory i do love this idea, i would suggest only doing it for ie6.
Give ie7 another 12-24 months, and possibly another 5 years for ie8.

M$ will never modify those browsers so dont hold your breath for a “fix“.

So for me...
Ie6_no support, ie7+8_no bells and whistles, ie9+_full support.
 

PixelPusher

Super Moderator
Staff member
In this case if everyone avoided the problem then maybe people would stop using IE and/or Microsoft would fix their browser.

Yeah I doubt this would ever happen...the only positive change I have seen MS do is implement auto update (and that took them 5 + years to do that).


@ OP
It would help if you could post a url for this page, so we can see more that just screen captures. Janja has a good point about your css reset. Its wise to include the html element in the reset rule.
 
Top