Doing a website with css
Posted on June 28th, 2008 in Links |
Planning to do a website? Want your website to look good on all the browser? Here is how to better manage your css without hacking css.
Let’s make this straightforward, first thing that you must consider is to learn the basic of css. Learning the box model is really helpful. Learn the box model of IE6,IE7 (yes they are different), Firefox or any standard browser.
After learning css, its time to create webpages. As we know Internet Explorer is the biggest share of browser market and usually because of this reason people will tell you to develop the site with IE first. This is completely wrong, there is a feature in IE (feature for me) that will help you a lot, more about it later.
You can use want any browser (except IE) as your working browser, but i would recommend Firefox, after getting firefox install Firebug, firebug is really helpful for inspecting elements on the page your working on, inspecting their styles, dimension, position, which dom they came from, etc.
Next step is to develop your site. In case of some pixel problem, just use firebug and click on the problem element and right click and inspect element, then the firebug will appear and on the style tab, you can see all the style of that certain element, you can test instantly by changing the style.
After making your site beautiful on firefox, its IE’s turn. There is a feature in IE that i learn love, and its the
<!–[if IE ]>
<![endif]–>
This simple tag will include a different css to your site thus making changes only to IE and not to other browser. Incase you need to seperate IE6 and IE7 then do something like this
For IE6:
<!–[if IE 6]> <link href=”/path/to/css” /> <![endif]–>
For IE7:
<!–[if IE 7]> <link href=”/path/to/css” /> <![endif]–>
And your done. Hope this helps.












