Jump to content
xisto Community
Sign in to follow this  
evion

Webpage Design Change For Different Browsers Is it possible?

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites

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 :P

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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".

Share this post


Link to post
Share on other sites

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 !! :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 .

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.