Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

Browser Detection?


(!)

num's Avatar
num num is offline
Member with 263 posts.
THREAD STARTER
 
Join Date: Oct 2005
30-Mar-2008, 07:28 PM #1
Browser Detection?
How can I make it so that my site can detect what browser is being used? My site is designed for firefox only, how can i create a portion that detects what browser the user is viewing my site with and pop up a different page overiding the entire site if its not firefox?
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,625 posts.
 
Join Date: Oct 2006
31-Mar-2008, 09:26 AM #2
Fyzbo's Avatar
Senior Member with 1,683 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
01-Apr-2008, 11:14 AM #3
What about your website is FF only? Can you provide the url. It may not be too difficult to modify the site to work in most browsers, then you will not have to exclude potential visitors or make a completely different version.
num's Avatar
num num is offline
Member with 263 posts.
THREAD STARTER
 
Join Date: Oct 2005
01-Apr-2008, 12:33 PM #4
my website url is

www.naspos.com
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
01-Apr-2008, 12:38 PM #5
Quote:
Originally Posted by Fyzbo View Post
What about your website is FF only? Can you provide the url. It may not be too difficult to modify the site to work in most browsers, then you will not have to exclude potential visitors or make a completely different version.
I agree. It looks like the CSS styling needs to be "massaged" a bit for IE.

Peace...
num's Avatar
num num is offline
Member with 263 posts.
THREAD STARTER
 
Join Date: Oct 2005
01-Apr-2008, 12:45 PM #6
i still don't know how i am to "massage" it into IE, seems easier to have a script to detect the browser.
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
01-Apr-2008, 12:51 PM #7
Quote:
Originally Posted by num View Post
i still don't know how i am to "massage" it into IE, seems easier to have a script to detect the browser.
Using a browser detection script might appear to be easier, but it's not the right thing to do AND the CSS tweaks for IE might prove to be even easier once we know what those are.

I saw the other thread you started and we can use that thread to address the CSS issues.

The point is to design your site correctly so it functions across browsers correctly not to design sites that are "easy" that work in one or two browsers only.

Peace...
num's Avatar
num num is offline
Member with 263 posts.
THREAD STARTER
 
Join Date: Oct 2005
01-Apr-2008, 01:09 PM #8
but that is the design i need.
Fyzbo's Avatar
Senior Member with 1,683 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
01-Apr-2008, 01:23 PM #9
If you are not willing to rework the css for all browsers the easy way would be using dean edwards ie8. Easier then browser detection and allows visitors to use IE.

http://code.google.com/p/ie7-js/

Just include this code snippet in the html <head>

<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
<![endif]-->
Fyzbo's Avatar
Senior Member with 1,683 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
01-Apr-2008, 01:25 PM #10
Just to let you know, the pages are not consistent in Firefox. Background change, padding changes, and the phone number shifts(is it supposed to be off to the left like that???) when I go from page to page.
Courtneyc's Avatar
Computer Specs
Member with 1,898 posts.
 
Join Date: Dec 2003
Location: South Central Kansas
Experience: Advanced
01-Apr-2008, 01:25 PM #11
The problem isn't that it's made for FireFox. The problem is that the site is not in XHTML Strict 1.0 format (it fails validation). So each browser has to make a guess as to what you really want the site to look like.

FireFox guesses correctly. IE guesses incorrectly. If you make the site true XHTML, both will look correct.

Courtney
num's Avatar
num num is offline
Member with 263 posts.
THREAD STARTER
 
Join Date: Oct 2005
01-Apr-2008, 02:23 PM #12
thanks as for the phone numbers, no they shouldn't be moving around, but i cannot figure a way out on how to anchor them.
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
01-Apr-2008, 03:22 PM #13
Quote:
Originally Posted by num View Post
thanks as for the phone numbers, no they shouldn't be moving around, but i cannot figure a way out on how to anchor them.
The problem with the numbers isn't they are moving but they are NOT moving with the rest of the page when the browser window is resized.

Go check out your other thread.

Peace...
Shadow2531's Avatar
Senior Member with 2,636 posts.
 
Join Date: Apr 2001
03-Apr-2008, 10:02 PM #14
You need to get rid of the "." before the doctype. It's causing, IE, Opera and Safari to use quirks mode. CSS won't completely work right if the browser isn't in standards mode.

http://www.opera.com/docs/specs/doctype/

(Firefox differs here and the "." doesn't trigger quirks mode. This is why you need to always check in Opera, Safari, IE (and Konqueror if possible) and don't just assume that FF is correct.)
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2