Senior Member
Join Date: Jun 2004
Location: Columbus, Georgia
|
I have a web portfolio due for my teaching classes and it is really driving me crazy. It looks fine in Safari, Firefox, and Opera and then I have problems with IE. I know I need to use a separate style sheet for IE, but I can not get it to load. I have php installed on the hosting server and have tried several things found on google. The problem seems to be that there are either no instructions on how to make sure the code is actually working or the instructions are so far over my head that I have to look for an easier solution.
All I want to do is check to see if the browser is IE, if it is load msieportfoliostly.css, if not load portfoliostyle.css. This should be fairly simple right? Why the hell can't I get it to work? What Adobe Updater‽ What‽ What‽ WHAT‽ |
quote |
Member
Join Date: Oct 2005
|
Why don't you try using JavaScript to identify the browser and store it as a variable, then (if, then) have it load the IE stylesheet if the browser variable is IE?
|
quote |
Veteran Member
Join Date: May 2004
Location: Promise Land of Trustafarians
|
I chose to just put a little message at the top of the page for IE browsers.
http://beniciapantherband.org I did that using server side includes. I put Code:
<!--#if expr="${HTTP_USER_AGENT} = /MSIE/" -->
<!--#include file="ieMessage.html" -->
<!--#endif --> that code my index file, which calls an HTML file if the browser is IE. It isn't 100% reliable, due to browser spoofing, but I figure users smart enough to know how to use browser spoofing will know that message isn't intended for them.Last edited by Ryan : 2006-02-25 at 16:39. |
quote |
Senior Member
|
Conditional comments pwn (And properly used, they're valid).
Code:
<link rel="stylesheet" type="text/css" href="/css/portfoliostyle.css" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/css/msieportfoliostly.css" /><![endif]--> This applies a different stylesheet to IE v.5+... If you plan on supporting IE 4, you'll need to use a server side solution.Also, the IE CSS will overlap the prior CSS... As such, the IE CSS shouldn't need to be as long. |
quote |
‽
|
What he said: use IE's conditional comments feature. No need for anything server-side at all, nor other sorts of trickery. Microsoft has a thorough explanation here. Make sure you exclude IE 7 from the different stylesheet, as its CSS parser is a lot better.
|
quote |
Senior Member
Join Date: Jun 2004
Location: Columbus, Georgia
|
Thanks guys. I got it working. The only reason I care at all about IE is that I know that the group that will be grading my web portfolio will be using IE on campus.
What Adobe Updater‽ What‽ What‽ WHAT‽ |
quote |
25 chars of wasted space.
|
Does
Code:
<script language="PHP"> //php code </script> really work? |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Quote:
[php]<?php //php code ?>[/php] The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|
quote |
Veteran Member
Join Date: May 2004
Location: Promise Land of Trustafarians
|
Quote:
|
|
quote |
25 chars of wasted space.
|
I didn't think that PHP would run like that Brad, but I thought I'd ask. I was wondering if there was a PHP module for apache that would parse that.
|
quote |
Senior Member
|
Quote:
|
|
quote |
25 chars of wasted space.
|
Indeed you are right, what do you know. Odd that I've never seen or heard of that before. No reason for that, it's just more typing, and I'd probably more easily confuse it with my HTML.
|
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting default browser (without Safari) | chriswallace00 | Genius Bar | 3 | 2005-09-20 09:17 |
Silly specific questions from a prospective newbie. | Christoph | Genius Bar | 7 | 2005-07-21 02:32 |
New File Browser? | Electric Monk | Speculation and Rumors | 3 | 2005-06-16 21:53 |
Browser Launches First? | Budgie | Genius Bar | 1 | 2005-03-23 15:06 |