Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 45 guests and 2 members online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Programmingarrow How do you make html/css work for different browsers?
EH-Net
May 23, 2013, 01:23:21 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: How do you make html/css work for different browsers?  (Read 7329 times)
0 Members and 1 Guest are viewing this topic.
famfu786
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: July 29, 2010, 12:12:37 AM »


My website looks good in internet explorer but it looks funny in firefox and chrome. What are the differences in the coding/css for all three? How do I fix this problem?
Logged

secureseven
Jr. Member
**
Offline Offline

Posts: 79



View Profile
« Reply #1 on: July 29, 2010, 09:41:42 AM »

Ah, web development. A love, and a curse. Cross-browser compat. has always been an issue with browsers interpreting css differently. The best thing to do is to stick with the w3 standards and even then it's still going to be weird. So you might have to write CSS for different browsers. Another thing is to use a CSS framework. I haven't used them because I stopped doing web dev in general, but these look promising: http://www.blueprintcss.org/
http://960.gs/

good luck.
Logged

http://twitter.com/mikesantillana
eLearnSecurity Team Member.
xXxKrisxXx
Hero Member
*****
Offline Offline

Posts: 512



View Profile
« Reply #2 on: July 29, 2010, 12:09:56 PM »

One way we learned in one of my web dev class is to use javascript to detect the specific browser as well as version and then use a selection structure (if / elseif / else) to check whether it's Internet Explorer Version x, Firefox, then set up the page like so, etc. We'd utilize the navigator class to make use of detecting the browser name and version - check it out http://krook.org/jsdom/navigator.html

I'll back secureseven in saying stick to w3 standards. It's good they give a ton of examples and show what browsers they're compatible with - you could take this into consideration when developing.
Logged

eCPPT, GCIH, OSCP, OSWP
ajohnson
Recruiters
Hero Member
*
Offline Offline

Posts: 1057


aka dynamik


View Profile WWW
« Reply #3 on: August 01, 2010, 12:19:02 AM »

The advice that I've always been given (and use with decent success) is to design for Firefox and then adjust to IE. You can make additional CSS entries for IE using syntax that is illegal and ignored by FF to make any adjustments necessary. I started out doing web design and quickly abandoned it because I couldn't tolerate this garbage. I can't believe it's still so much of a problem a decade later Sad
Logged

WIP: GCFA | www.infosiege.net | @infosiege

The day you stop learning is the day you start becoming obsolete.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.083 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Free Business and Tech Magazines and eBooks

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.