Welcome to WebmasterWorld Guest from 54.242.94.72

Forum Moderators: incrediBILL

Message Too Old, No Replies

help with header logo browser detection

     

Joshlad

3:50 pm on Feb 25, 2012 (gmt 0)



using chrome my page looks extremely nice, but using anything else the header just breaks.

i would like to use link a if browser is chrome, and link b if browser is not chrome, but unfortunately i am not sure how to do this.

a www.joshlad.me/headtext.html
b www.joshlad.me/altheadtext.html

i tried using php include but as this renders before javascript making it in-effective.

first time using browser detection scripts, and i am fully aware that you can use them to link to stylesheets, but for chrome i would like to use html <br> as it makes a column indent.

Thank you, Josh.

tedster

6:59 pm on Feb 25, 2012 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to the forums, Joshlad.

Browser detection should be a last resort. If only Chrome shows the layout you intended, then there is almost definitely something you can change in your source code to get a better cross-browser uniformity.

Have you tried validating your HTML and CSS? Working to fix cross-browser challenges but not having validated mark-up can be a losing battle, because each browser may be using a different error-correction routine. This can turn your coding challenge into a frustrating game of whack-a-mole.

So I'd suggest working toward on code for all desktop browsers, starting by using the W3C validators.

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month