hey ,
will anybody sugest me how an i use comman CSS to webpage
basically i want to use this for http://www.nikeshyadav.com/ i m using is

<?php 
if (eregi("MSIE",$_SERVER['HTTP_USER_AGENT']))
 echo   '<link href="css/iestyle.css" rel="stylesheet" type="text/css" />';
else
 echo   '<link href="css/otherstyle.css" rel="stylesheet" type="text/css" />';			
 
 ?>

but it is not a good way in my sense,


waiting for ur suggestion

thanxs

Do you really need multiple stylesheets? I've found that you just need one that works on all browsers. This sounds simple, but it's not. Here are some tricks:
1.) Validate with W3C
2.) Reset margin and borders to 0 at the beginning of the stylesheet. Then redefine if necessary.
3.) Don't place size styles like width and height and surrounding styles like border, margin, and padding in the same tag. Instead, use a container div for surrounding styles and put the size styles inside a child div.
4.) Hacks are a last resort.

hey buddylee,
first of all thanks for ur replay.

i will try your suggestion but will u give me w3c validation rule link(url)

http://validator.w3.org/
Also, you can install the free web developer add-on for Firefox and validate the current page by pressing Ctrl+Shift+A. I've found that this makes validating faster and more convenient.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.