vijaysuman — 2012-03-13T07:08:04-04:00 — #1
what are the steps we have to take to appear webpage similarly in all the browsers? means in css and html
stevie_d — 2012-03-13T08:32:35-04:00 — #2
If you aren't too worried about IE7 and older, you can usually get a pretty good similarity in all mainstream browsers just by making sure that you have used valid code - use the validators (http://validator.w3.org for HTML and http://jigsaw.w3.org/css-validator for CSS) and fix any errors that are highlighted. That isn't guaranteed to give you an identical cross-browser rendering, but it sorts out most problems.
ralphm — 2012-03-13T08:37:45-04:00 — #3
Yes, just make sure you understand CSS and HTML properly, and don't try to do anything too fancy. Simple, straightforward HTML works in all browsers, so add your CSS carefully. It's best to check each browser as you go.
serverstorm — 2012-03-13T12:46:22-04:00 — #4
Be careful in using floats as Older IE has some wicked bugs that will cause different rendering without CSS hacks or Conditional Comments. It doesn't mean you can't use them, you should just be knowledgeable about the best techniques so you don't have to mangle your code.
Don't be afraid to let a different user experience to happen on browsers than won't or are difficult/complicated to make work with some features like using CSS3 shadows on boxes or text and plain borders and text if the CSS3 is supported. But do make sure that even your basic look will work; for example don't use white text with a shadow that doesn't render on a white page.
Hope this helps a little.
ryanreese — 2012-03-13T22:42:01-04:00 — #5
For beginners, I definitely recommend coding in small sections. Code the HTML/CSS for one section of the website (not too much!) and then check it in all the browsers. That way, if something breaks, you can definitely narrow down what is causing it. It's frustrating to code the whole page, check it in the browsers, and find that one (or all) are way out of whack.
As you get better, you can check it less frequently. Many people, myself included, just check at the end of the document, validate then, etc. Until you get the hang of coding and feel fluent in it, definitely check it every once in a while.
Especially in IE. Those versions of browsers create some wicked results sometimes, especially when floats are involved (as ServerStorm mentioned)