Ripeto il problema: a 1280x1024 sito visualizzato correttamente su IE e firefox, a 1024x768 e minori il sito segue le proprozioni solo su firefox, mentre su IE le larghezze sono diverse e soprattutto il sito si attacca al margine sx dello schermo, quando invece dovrebbe essere centrato. Help!!
Il css:
codice:
#page {
width: 100%;
}
#wrapper {
border: 1px solid #D6D5D5;
background: #ffffff;
}
#topbar {
height: 30px;
line-height: 30px;
margin-left: 10px;
margin-right: 10px;
background: url(../images/pathway_below.gif);
display: block;
border: 1px solid #E6E6E6;
}
#topcontent {
float: left;
display: inline;
line-height: 30px;
}
#topleft {
height: 30px;
float: left;
display: inline;
width: 10px;
}
#topmenu {
height: 30px;
float: left;
display: inline;
width: auto;
}
#topsearch {
float: right;
display: inline;
padding-top: 3px;
line-height: 30px;
vertical-align: middle;
padding-right: 10px;
}
/* IE HACKS */
html>body #topsearch {
padding-top: 4px;
}
#topright {
height: 30px;
float: right;
display: inline;
width: 10px;
}
#headerbar {
margin-left: auto;
margin-right: auto;
background: url(../images/header_bg.gif);
height: 100px;
}
#headercontent {
float: left;
display: inline;
height: 100px;
}
#headerlogo {
float: left;
display: inline;
height: 100px;
line-height: 100px;
vertical-align: middle;
overflow: hidden;
margin-left: auto;
margin-right: auto;
}
#headersitename {
float: left;
display: inline;
line-height: 100px;
height: 100px;
vertical-align: middle;
color: #FFFFFF;
font-size: 42px;
font-family: "Verdana", Verdana, serif;
padding-left: 145px;
}
#headersitename a:link, #headersitename a:visited {
color: #FFFFFF;
text-decoration: none
}
#headersitename a:hover {
color: #0099FF;
text-decoration: none
}
#headerleft {
width: 10px;
float: left;
display: block;
}
#headerright {
width: 10px;
float: right;
display: block;
}
#headlines {
width: 99.8%;
float: left;
display: block;
margin-bottom: 10px;
background: #e6e6e6;
border: solid 1px #e6e6e6;
}
#bodylatest {
float: left;
display: block;
margin-left: 5px;
margin-right: 2px;
}
#bodypopular {
float: right;
display: block;
margin-right: 5px;
margin-left: 2px;
}
#mainbody {
width: 100%;
float: left;
display: block;
}
#pathwaybar {
margin-left: 10px;
margin-right: 10px;
background: #ffffff url(../images/pathway_below.gif);
height: 25px;
}
#pathwaycontent {
float: left;
display: block;
line-height: 25px;
height: 25px;
vertical-align: middle;
text-align: left;
}
.pathway {
color: #FB9220;
font-weight: bold;
display: inline;
height: 25px;
line-height: 25px !important;
line-height: 22px;
padding-left: 4px;
margin-bottom: 2px;
}
.pathway img {
margin-left: 5px;
margin-right: 5px;
margin-top: 6px;
}
.pathway a:link, .pathway a:visited {
color: #666666;
font-weight: normal;
}
.pathway a:hover {
color: #999999;
text-decoration: none;
font-weight: normal;
}
#pathwayleft {
width: 10px;
float: left;
display: block;
}
#pathwayright {
width: 10px;
float: right;
display: block;
}
#maincontent {
display: block;
margin-left: 5px;
margin-right: 5px;
}
#leftsection {
width: 23%;
margin-top: 0px;
}
#leftmodules {
margin-right: 5px;
margin-top: 0px;
}
#rightsection {
width: 25%;
text-align: left;
}
#rightmodules {
margin-left: 5px;
text-align: left;
}
#footerbar {
margin-left: 10px;
margin-right: 10px;
background: url(../images/footer_bg.gif) repeat-x;
height: 69px;
}
#footercontent {
float: left;
display: block;
padding-top: 10px;
color: #000000;
width: 97%;
}
#footercontent a:link, #footercontent a:visited {
color: #000000;
font-weight: bold;
}
#footercontent a:hover {
color: #000000;
text-decoration: none;
font-weight: bold;
}
#footerleft {
width: 10px;
float: left;
display: block;
}
#footerright {
width: 10px;
float: right;
display: block;
}
.spacer {
margin-left: 10px;
margin-right: 10px;
height: 10px;
display: block;
}
.spacer-border-bottom {
height: 10px;
display: block;
margin-left: 10px;
margin-right: 10px;
border-bottom: solid 1px #e6e6e6;
}
/* DEFAULT SETTINGS */
/* Below are default settings are used when no other style has been defined.*/
body {
margin-bottom: 10px;
margin-top: 10px;
font-size: 76%;
margin-left: auto;
margin-right: auto;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
color: #636363;
background: #F3F2F2;
}/*Style for the body tag of your website, controls font family page background, etc.*/
a:link, a:visited {
color: #999999;
text-decoration: none;
font-weight: bold;
} /* general links style*/
a:hover {
color: #666666;
text-decoration: none;
font-weight: bold;
}
hr {
width: 1px;
color: #D6D5D5;
} /* horizontal line in your template*/
hr.separator {
width: 1px;
color: #D6D5D5;
}
/* FORMS SETTINGS */
.button {
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
background: #EFEFEF;
padding: 0px 5px;
height: 23px;
color: #898989;
margin: 1px;
vertical-align: middle;
cursor: pointer;
}
/*
html>body .button {
height: 22px;
line-height: 22px;
}*/
/* NAVIGATION/MENU SETTINGS */
a.mainlevel{
display: block;
vertical-align: middle;
font-size: 11px;
font-weight: bold;
color: #ccc;
text-align: left;
padding-left: 18px;
height: 25px !important;
line-height: 25px;
text-decoration: none;
border-bottom: solid 1px #F3F3F3;
} /* this styling is for the MAIN items in the menu */
a.mainlevel:link, a.mainlevel:visited {
background: url(../images/btn_mainlevel_normal.gif) no-repeat left;
color: #C3C2C2;
}
a.mainlevel:hover {
background: url(../images/btn_mainlevel_hover.gif) no-repeat;
color: #666666;
text-decoration: none;
}
a.mainlevel#active_menu {
background: url(../images/btn_mainlevel_active.gif) no-repeat left;
line-height: 25px;
color: #FBAF5C;
text-decoration: none;
} /* this styling is for the menu item when it is active, even in main/sub position*/
ul#mainlevel-nav
{
list-style: none;
padding: 0;
margin: 0;
font-size: 0.8em;
}
ul#mainlevel-nav li
{
background-image: none;
padding-left: 0px;
padding-right: 0px;
float: left;
margin: 0;
font-size: 11px;
line-height: 30px;
white-space: nowrap;
display: block;
}
ul#mainlevel-nav li a
{
display: block;
padding-left: 15px;
padding-right: 15px;
text-decoration: none;
color: #666666;
background: transparent;
border-right: 1px solid #E6E6E6;
border-left: 1px solid #F5F5F5;
}
#buttons>ul#mainlevel-nav li a { width: auto; }
ul#mainlevel-nav li a:hover
{
display: block;
color: #333333;
background: #F0EFEF;
border-right: 1px solid #E6E6E6;
border-left: 1px solid #F5F5F5;
}
a.sublevel{
line-height: 20px;
} /* this styling is for menu items that HAS A PARENT */
a.sublevel:link, a.sublevel:visited {
color: #999999;
text-decoration: none;
}
a.sublevel:hover {
color: #666666;
text-decoration: none;
}
.pagenavbar {
color: #ffffff;
} /*Sets the style for the footer navigation ("<< Start < Prev Next > End >>")
when they do not appear as hyperlinks (when only a few articles exist).*/
.pagenavbar:link, .pagenavbar:visited {
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
width: auto;
padding: 0px 10px;
line-height: 20px;
margin: 1px;
}
.pagenavcounter {
font-size: 12px;
color: #0099FF;
display: block;
}
a.readon:link, a.readon:visited {
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
background: #EFEFEF;
padding: 0px 5px;
height: 26px;
line-height: 26px;
margin: 1px;
vertical-align: middle;
color: #898989;
} /*Style for the "Read More" link that is displayed for large content items*/
a.readon:hover {
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
background: #FFFFFF;
color: #959595;
padding: 0px 5px;
height: 26px;
line-height: 26px;
margin: 1px;
vertical-align: middle;
text-decoration: none;
}
/*Style for the "BACK" button*/
.back_button a:link, back_button a:visited {
float: left;
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
width: auto;
background: #EFEFEF;
color: #898989;
padding: 0px 10px;
line-height: 20px;
margin: 1px;
display: block;
}
.back_button a:hover {
float: left;
text-align: center;
font-size: 11px;
font-weight: bold;
border: 3px double #cccccc;
width: auto;
background: #FFFFFF;
color: #959595;
padding: 0px 10px;
line-height: 20px;
margin: 1px;
display: block;
text-decoration: none;
}
.pagenav_prev {} /*Style for the PRE button*/
.pagenav_next {} /*Style for the NEXT button*/
/*Style for latest news list - by default, latest news is user1 module*/
.latestnews li {
list-style: url(../images/mostread.gif);
}
/*Style for most popular list - by default, most popular is user2 module*/
.mostread li{
list-style: url(../images/popular.gif);
}
/* CONTENT PAGE SETTINGS */
a.category:link {}
a.category:hover {}
a.category:visited {}
ul li {
list-style: url(../images/arrow.png);
}
.blogsection {} /* Formatting the links in Blog section */
.blog_more {
color: #333333;
} /*The "More" text in blog section*/
a.blogsection:link, a.blogsection:visited {
color: #999999;
text-decoration: none;
font-weight: bold;
} /* set the link format */
a.blogsection:hover {
color: #666666;
text-decoration: none;
font-weight: bold;
} /* same as above, but for links with mouse pointer over it */
.componentheading {
background: url(../images/btn_mainlevel_normal.gif) no-repeat;
padding-left: 20px;
line-height: 25px;
vertical-align: middle;
font-weight: bold;
font-size: 14px;
color: #959595;
padding-bottom: 15px;
}/* Title of the component being used to display the content.*/
.contentheading {
line-height: 25px;
background: url(../images/contentheading.gif) no-repeat;
padding-left: 22px;
font-size: 18px;
font-family: "Verdana", Times, serif;
color: #FF9900;
} /* Title of the content, article, etc. being displayed.*/
/* JOOMLA - MAMBO SECTIONS LISTINGS */
.sectiontableheader {
background: #EFEFEF;
font-size: 12px;
font-weight: bold;
} /* This is for styling the section table headers on a
SECTION's page. Example: table header of "Date", "Item Title", "Author" and "Hits"? */
.sectiontableentry2 {
text-align: left;
background: #FEF4E8;
height: 25px;
padding-left: 3px;
}
.sectiontableentry1 {
text-align: left;
background: #FFFFFF;
height: 25px;
padding-left: 3px;
}
/* JOOMLA - MAMBO MODULES FORMATTING */
table.moduletable th, div.moduletable h3 {
border-bottom: solid 1px #E6E6E6;
line-height: 25px;
margin: 0 0 2px 0;
margin-top: 2px;
font-size: 12px;
color: #959595;
vertical-align: middle;
text-transform: uppercase;
} /* Formatting the module table */
table.moduletable {
width: 100%;
margin-bottom: 15px;
padding: 0px;
border-spacing: 0px;
border-collapse: collapse;
} /* Formatting the module header, and the module titles */
table.moduletable td {} /* Formatting the table cells of the module table */
div.moduletable {
padding: 0;
margin-bottom: 0px;
}
/* MISCELLANEOUS */
/* Dates , Authors*/
.createdate {
font-size: 11px;
font-style: italic;
color: #929292;
} /* For styling the date the content/articles are created under contents title */
.modifydate {
font-size: 11px;
font-style: italic;
color: #929292;
} /* Formating "Last updated on" text at the end of articles/contents */
.small {
font-size: 11px;
font-style: italic;
color: #929292;
} /* Formating "Written by:...." text */
.smalldark {
font-size: 11px;
font-style: italic;
color: #7B7B7B;
}/*Found in poll result page, for " Number of Voters".. text *
E questo è parte dell'index.php:
codice:
<?php
/*
800 x 600 set $size = 1
1024 x 768 set $size = 2
Full width set $size = 0
*/
// not very good, i'll improve it someday
if ($size == 1) {
$width = "80%";
}
elseif ($size == 2) {
$width = "80%";
}
elseif ($size == 0) {
$width = "80%";
}
?>