HOME       >>       Graphics, Design & Animation

Webpage Design Change For Different Browsers Is it possible?


evion

I was just wondering if lets say a site viewed on Internet Explorer seems perfect but when viewed on other browsers will look horrible and disoriented, is there a code which i can use so as when the "index.htm" site detects a Mozilla browser for instance then it will automatically redirect to another webpage designed for that certain browser.If there is such a code or if someone can code it, I will greatly appreciate it. Thanks


NilsC

The little I know about it I'm trying out CSS and the different "hacks" used to get non compliant IE to display the webpage correctly.

 

If you create the website for a "w3c" compliant browser then it will show correctly in those browsers and the code will most likely be correct in newer versions released of the same "w3c" compliant browsers. IE may be compliant some time this century

 

I use a lot of the tips and tricks on w3schools

 

I think it's easier to write for the compliant browser and use the hacks to make it look good in IE than to write 2 different websites for 2 different browsers. Then what do you do if they use opera or a text reader?

 

Nils


evion

Hmm...that makes sense. Thanks for the website recommendation, I've found info there that i never really thought of before. For this redirect problem i might put a link to another webpage for other browsers.


Hercco

The best way, in my opinion is to do this with PHP and then either include a page suitable for the browser or redirect. It is in fact really easy to to. The global server variable $_SERVER['HTTP_USER_AGENT'] contains string form the HTTP request telling the browser. To check which browser it is, you should use regular expression (with ereg() ) or a function like strpos(). Internet explorer can be identified from a string MSIE. It is also wise to check that it is not just some other browser (like Opera for example) disguising itself as IE. The HTTP_USER_AGENT that Opera sends also contains string "Opera".


miCRoSCoPiC^eaRthLinG

The best way, in my opinion is to do this with PHP and then either include a page suitable for the browser or redirect.

 

It is in fact really easy to to. The global server variable $_SERVER['HTTP_USER_AGENT']  contains string form the HTTP request telling the browser.

 

To check which browser it is, you should use regular expression (with ereg() ) or a function like strpos().

 

Internet explorer can be identified from a string MSIE. It is also wise to check that it is not just some other browser (like Opera for example) disguising itself as IE. The HTTP_USER_AGENT that Opera sends also contains string "Opera".

<{POST_SNAPBACK}>


Good method - but instead of designing multiple copies of the same page - it'll be more efficient if you use style-sheets. For say 3 different browsers, make 3 stylesheets and use php to make the same page load a different style-sheet in each case depending on the browser. It works !!

webguide

What software do you use for creating your webpages? Whenever I make webpages I use dreamweaver because it is built to be w3c compliant. For example it tells you what CSS features are available for any particular browser. Very useful


spacewaste1405241471

Yes webguide that is completly correct infact...Dreamweaver if I'm not mistake can even edit the pages to help you make them w3c compliant which would be really helpfull in a situation like this...But when you try to make something compatible for all three types of browsers...You might have to remove some features....So maybe designing three different types might not be sucha bad idea?...


webguide

I cannot think of any feature that is both useful and unsupported by all three browsers.


chiiyo

Hmm, just a quick question here: If you have the same page, and three different designs by using three different css stylesheets, would it really solve the problem? I'm confused because I thought the browsers don't display a page properly because of the original html coding in it, and if css only changes the appearance of the page, how is it that a page that looks bad in one browser can look better with a change of css? Does that in fact mean that css is part of the reason why the browser screwed up in the first place??I know my question is a bit loopy-going-around-in-circles... A bit blur about this.


hihihihi88

Good method - but instead of designing multiple copies of the same page - it'll be more efficient if you use style-sheets.  For say 3 different browsers, make 3 stylesheets and use php to make the same page load a different style-sheet in each case depending on the browser. It works !!

<{POST_SNAPBACK}>


Wowww

it is a good solution , I also facing this problem of my website ..>.<

now I try to slove it .


sirknight

Yes, its really possible but you need a tedious study to learn all web browser technology..Nevertheless, you all also need to learn the CSS for all kind of browser.


rjgentry

my solution is to be a pain..just build your site for the browser you want...down with everyone else!!! hahahhah (sinister laugh)...


hazeshow

It's not necessary to use PHP (to have a PHP server), you could also use Javascript to find out the visitor's browser and to do certain actions:

 

<script LANGUAGE="JavaScript">

<!--

if(navigator.appName == "Netscape")

{alert("You are using Netscape Browser! Please go and install Microsoft Internet Explorer. This site looks better if you do so! :-)")}

//-->

 

my solution is to be a pain..just build your site for the browser you want...down with everyone else!!! hahahhah (sinister laugh)...

<{POST_SNAPBACK}>


Absolutely right! Keep one thing in mind: it's YOUR site!

 

GreetingZ



VIEW ORIGINAL REGISTER GET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.