<?php
header("Content-type: text/css");
$HTTP_USER_AGENT = $_SERVER["HTTP_USER_AGENT"];
echo "/*user-agent {\n\tname: " . $HTTP_USER_AGENT . "\n}\n";

$browser = false;
$versione = false;
if (strstr($HTTP_USER_AGENT, "MSIE 6") && !strstr($HTTP_USER_AGENT, "Opera")) {
	$browser = "ie";
	$versione = "6";
}
else
if (strstr($HTTP_USER_AGENT, "Firefox")) {
	$browser = "firefox";
	$versione = "1.0";
}
else
if (preg_match("/Mozilla\/5\.0 .* rv:1\.7.* Gecko\/.*/", $HTTP_USER_AGENT)) {
	$browser = "mozilla";
	$versione = "1.7";
}
else
if (preg_match("/Mozilla\/5\.0 .* rv:1\.0.* Gecko\/.*/", $HTTP_USER_AGENT)) {
	$browser = "mozilla";
	$versione = "1.0";
}
else
if (strstr($HTTP_USER_AGENT, "Konqueror")) {
	$browser = "konqueror";
	$versione = "2.2";
}
else
if (strstr($HTTP_USER_AGENT, "Opera 7")) {
	$browser = "opera";
	$versione = "7";
}
else
if (strstr($HTTP_USER_AGENT, "Opera 6")) {
	$browser = "opera";
	$versione = "6";
}
else
if (strstr($HTTP_USER_AGENT, "Opera 5")) {
	$browser = "opera";
	$versione = "5";
}
else
if (strstr($HTTP_USER_AGENT, "Netscape/7")) {
	$browser = "netscape";
	$versione = "7";
}
else
if (preg_match("/.* \(Macintosh; .* Netscape6.*/", $HTTP_USER_AGENT)) {
	$browser = "netscape";
	$versione = "6mac";
}
else
if (preg_match("/.* \(compatible; OmniWeb\/4.*/", $HTTP_USER_AGENT)) {
	$browser = "omniweb";
	$versione = "4";
}
else
if (strstr($HTTP_USER_AGENT, "MSIE 5")) {
	$browser = "ie";
	$versione = "5";
}
else
if (preg_match("/.* MSIE 5 .* Mac_PowerPC .*/", $HTTP_USER_AGENT)) {
	$browser = "ie";
	$versione = "5mac";
}
else
if (strstr($HTTP_USER_AGENT, "amaya/8")) {
	$browser = "amaya";
	$versione = "8";
}
else
if (preg_match("/.* Linux; .* Firefox.*/", $HTTP_USER_AGENT)) {
	$browser = "firefox";
	$versione = "0.8linux";
}
echo $browser . " " . $versione . "\n*/";
?>
/*---------------------------------Parte comune a tutti i browser --------------------------------*/
body { 
	font-family: Verdana, Arial, Helvetica, sans-serif;
	width: 100%;
	margin: 0 auto 0 auto;
	padding: 0;
}
h1 {
	font-size: 1.1em;
	font-weight: bold;
	color: black;
}
h1 a, h1 a:link, h1 a:visited, h1 a:hover {
	text-decoration: none;
	font-style: italic;
	font-weight: bold;
	color: yellow;
}
h2 {
	font-size: 1em;
	font-weight: bold;
	color: black;
}
h2 a, h2 a:link, h2 a:visited, h2 a:hover {
	text-decoration: none;
	font-style: italic;
	font-weight: bold;
	color: black;
}
h3 {
	font-size: 0.90em;
	font-weight: bold;
	color: black;
}
h3 a, h3 a:link, h3 a:visited, h3 a:hover {
	text-decoration: none;
	font-style: italic;
	color: black;
	font-weight: bold;
}
h4 {
	font-size: 0.80em;
	font-weight: bold;
	color: black;
}
h4 a, h4 a:link, h4 a:visited, h4 a:hover {
	text-decoration: none;
	font-style: italic;
	color: black;
	font-weight: bold;
}
h5 {
	font-size: 0.70em;
	font-weight: bold;
	color: black;
}
h5 a, h5 a:link, h5 a:visited, h5 a:hover {
	text-decoration: none;
	font-style: italic;
	color: black;
	font-weight: bold;
}
h6 {
	font-size: 0.60em;
	font-weight: bold;
	color: black;
}
h6 a, h6 a:link, h6 a:visited, h6 a:hover {
	text-decoration: none;
	font-style: italic;
	color: black;
	font-weight: bold;
}
p {
	font-size: 0.70em;
	margin: 0 0 1% 0;
	padding: 0;
	color: black;
}
p a, p a:link, p a:visited, p a:hover {
	color: red;
	text-decoration: none;
}
/*ul#disc {
	list-style-type: disc;
	list-style-position: outside;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 0.80em;
	color: black;
}
ul#circle {
	list-style-type: circle;
	list-style-position: outside;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 0.80em;
	color: black;
}
li {
	font-size: 0.80em;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: black;
}*/
ul {
	font-size: 0.70em;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: black;
}
ul a, ul a:link, ul a:visited, ul a:hover {
	color: red;
	text-decoration: none;
}
ul#circle {
	list-style-type: circle;
	list-style-position: outside;
	font-size: 100%;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: black;
}	
/*#banner table {
	background-color: yellow;
	border-style: solid;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 76px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}*/
table#banner {
	background-color: black;
	border-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 76px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}
#banner img {
	width: 739px;
	height: 75px; 
	border-style: none;
}
/*#login tr {
	background-color: white;
	border-bottom: 2px solid red;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 26px;
	position: absolute;
	top: 76px;
	left: 0;
	right: 0;
}*/
/*table#login {
	background-color: white;
	border-bottom: 2px solid black;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 26px;
	position: absolute;
	top: 76px;
	left: 0;
	right: 0;
}*/
table#home {
	border-bottom: 1px solid white;
	margin: 0;
	padding: 0;
	width: 160px;
	height: 48px;
	position: absolute;
	top: 76px;
	left: 0;
	/*right: 0;*/
}	
#home td{
    font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: black;
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	color: white;
	#padding: 5px;
	#width: 150px;
	#height: 48px;
	#top: 76px;
	#left: 0;
	right: 0;
}
#home a {
	color: white;
	text-decoration: none;
}
#home a:hover {
	color: red;
	text-decoration: none;
}
table#loghi {
	background-color: white;
	border-bottom: 2px solid black;
	margin: 0;
	padding: 0;
	width: 800px;
	/*width: 100%;*/
	height: 48px;
	position: absolute;
	top: 78px;
	left: 170px;
	/*right: 0;*/
}	
#loghi td{
    font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: white;
	/*border-bottom: 2px solid black;*/
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	color: black;
	padding-left: 15px;
	padding-right: 0;
	padding-top: 0;
	padding-bottom: 0;
	#width: 820px;
	#height: 48px;
	#top: 78px;
	#left: 151px;
	right: 0;
}
/*#login tr{
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: black;
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	border-bottom: 2px solid white;
	padding: 5px;
	width: 150px;
	color: white;
	height: 27px;
	top: 76px;
	left: 0;
	right: 0;
}
#login td{
	background-color: black;
	border-bottom: 2px solid white;
	padding: 5px;
	width: 150px;
	height: 27px;
	top: 76px;
	left: 0;
	right: 0;
}*/
/*per il momento la parte che segue non serve e inoltre va perfezionata*/
/*table#login2 {
	background-color: white;
	border-bottom: 2px solid black;
	margin: 0;
	padding: 0;
	width: auto;
	position: relative;
	top: 76px;
	left: 150;
	right: 0;
}	
#login2 tr{
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: white;
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	border-bottom: 2px solid black;
	padding: 5px;
	width: auto;
	color: black;
	height: 27px;
}
#login2 td{
	background-color: white;
	border-bottom: 2px solid black;
	padding: 5px;
	width: auto;
	height: 27px;
}*/

/*#login td {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: black;
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	border-bottom: 2px solid white;
	padding: 5px;
	width: 150px;
	color: white;
	height: 27px;
}*/
#cerca {
	position: absolute;
	top: 126px;
	left: 0;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: black;
	color: white;
	font-size: 10px;
	font-weight: normal;
	border-bottom: 1px solid white;
	padding: 5px;
	margin: 0;
	width: 150px;
	height: 50px;
	text-transform: lowercase;
	/*border-bottom: 2px solid white;*/
}
#input {
	border: 2px grey ridge;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: black;
	font-size: 12px;
	background-color: white;
	height: 20px;
	width: 80px;
	margin-top: 10px;
	margin-left: 12px;
}
#submit {
	border-style: none;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: white;
	font-size: 10px;
	background-color: black;
	text-transform: capitalize;
}
#menu {
	position: absolute;
	top: 171px;
	left: 0;
}
#menu dt {
  	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: black;
	color: white;
	font-size: 10px;
	font-weight: normal;
	border-bottom: 1px solid white;
	padding: 5px;
	width: 150px;
	text-transform: uppercase;
}
#menu a {
	color: white;
	text-decoration: none;
}
#menu a:hover {
	color: red;
	text-decoration: none;
}
#content {
	position: absolute;
	top: 20%;
	#margin-top: 25%;
	left: 160px;
	#margin-left: 50%;
	right: 20px;
	#margin: 0 20px 0 0;
	margin: 0;
	padding: 10px;
	background-color: transparent;
}
table#evidenza {
	background-color: red;
	border-bottom: 2px solid black;
	margin: 0;
	padding: 0;
	width: 150px;
	height: 27px;
	position: absolute;
	top: 76px;
	left: 0;
	right: 0;
}
#evidenza td{
	font-family: Verdana, Arial, Helvetica, sans-serif;
	background-color: yellow;
	font-size: 10px;
	font-weight: normal;
	text-transform: uppercase;
	color: white;
	padding: 5px;
	width: 150px;
	height: 27px;
	top: 76px;
	left: 0;
	right: 0;
}
table.footer {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #FFFFFF;
	padding: 0;
	background-color: #003399;
	margin: 0;
	white-space: nowrap;
	line-height: 15px;
	width: 100%;
	border-style: none;
}
table.footer td {
	border-style: none;
	padding: 0px 0px 0px 20px;
}
table.footer td a:link {
    color: #FFFFFF;
}
table.footer td a:visited {
    color: #FFFFFF;
}
table.footer td a:hover {
	color: #FFFFFF;
	text-decoration: underline;
}
<?php
/*-- Internet Explorer 6 e 5 per Windows e Mac ------------------*/
if ($browser == "ie") {
?>
#content {
	position: absolute;
	top: 20%;
	left: 160px;
	right: 20px;
	margin: 0;
	padding: 10px;
}
<?php
}
?>
