homepage Welcome to WebmasterWorld Guest from 54.196.189.229
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
help with header logo browser detection
Joshlad




msg:4421713
 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




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

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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved