Przedszkolak
Postów: 84 Ostrzeżeń: 6
Data rejestracji: 11.10.2007 17:43
|
Witam
Zaczynam przygodę z theme'em BlueStar i nie pieruna nie potrafię wyśrodkować strony. Z pomocą jednego z użytkowników udało mi się ustawić stałą szerokość strony za co wielkie podziękowania dla niego.
Zaglądałem do theme.php oraz styles.css ale żaden z opisanych na forum sposobów odnoszących się do innych theme'ów nie poskutkował w przypadku BlueStar.
theme.php:
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class=\"bullet\">·</span>");
require_once INCLUDES."theme_functions_include.php";
/**
* I Don't need for this:
* function get_head_tags() {}
**/
function render_page($license=false) {
global $settings, $main_style, $locale, $aidlink;
// Header
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\">\n";
echo "<tr>\n";
echo "<td class=\"header-left\" rowspan=\"4\"></td>";
echo "<td class=\"header-top\">\n";
if(iMEMBER){
echo "<a href=\"".BASEDIR."edit_profile.php\">".$locale['global_120']."</a> |".
" <a href=\"".BASEDIR."messages.php\">".$locale['global_121']."</a>".
(iADMIN ? " | <a href=\"".ADMIN."index.php".$aidlink."\">".$locale['global_123']."</a>" : "").
" | <a href=\"".BASEDIR."setuser.php?logout=yes\">".$locale['global_124']."</a>\n";
} else {
echo "<form method=\"post\" action=\"".FUSION_SELF."\" style=\"margin-top: 0 auto;\">\n";
echo $locale['global_101']." <input type=\"text\" name=\"user_name\" class=\"textbox\" style=\"width:100px\" />\n";
echo $locale['global_102']." <input type=\"password\" name=\"user_pass\" class=\"textbox\" style=\"width:100px\" />\n";
echo "<input type=\"submit\" name=\"login\" value=\"".$locale['global_104']."\" class=\"button\" />\n";
echo ($settings['enable_registration'] ? " | <a href=\"".BASEDIR."register.php\">".$locale['global_107']."</a>\n" : "").
" | <a href=\"".BASEDIR."lostpassword.php\">".$locale['global_108']."</a>";
echo "</form>\n";
}
echo "</td>";
echo "<td class=\"header-right\" rowspan=\"4\"></td>";
echo "</tr><tr>\n";
echo "<td class=\"header-logo\">\n";
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" style=\"height: 100%;\">\n";
echo "<td>".showbanners()."\n</td>";
echo "<td align=\"right\" width=\"200\" style=\"width: 200px;\" valign=\"bottom\">\n";
echo "<form id=\"headsearch\" method=\"get\" action=\"".BASEDIR."search.php\">\n";
echo "<input type=\"hidden\" name=\"stype\" value=\"news\" />\n";
echo "<input type=\"text\" name=\"stext\" value=\"Search\" onclick=\"if(this.value=='Search')this.value='';\" onblur=\"if(this.value=='')this.value='Search';\" class=\"headsearchbox\" style=\"width:160px\" />";
echo "<input type=\"submit\" name=\"submit\" value=\"›\" class=\"headsearchbutton\" style=\"width:20px\" />";
echo "</form>\n";
echo "</td></tr></table>";
echo "</td>";
echo "</tr><tr>\n";
echo "<td class=\"header-navigation-top\">".showsublinks("", "nav-item")."</td>";
echo "</tr><tr>\n";
echo "<td class=\"header-navigation-bottom\"></td>";
echo "</tr>\n";
echo "</table>\n";
//Content
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"".$main_style."\">\n";
echo "<tr>\n";
echo "<td class=\"body-left\" valign=\"top\"></td>";
if (LEFT) { echo "<td class=\"panels-left\" valign=\"top\">".LEFT."</td>"; }
echo "<td class=\"body-main\" valign=\"top\">".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class=\"panels-right\" valign=\"top\">".RIGHT."</td>"; }
echo "<td class=\"body-right\" valign=\"top\"></td>";
echo "</tr>\n";
echo "</table>\n";
// Footer
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\">\n<tr>\n";
echo "<td class=\"footer-left\"></td>\n";
echo "<td align=\"left\" class=\"footer-center\">\n";
echo "<div style=\"float: left;\">".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</div>\n";
echo "<div style=\"float: right;\">".showcounter()."</div>\n";
echo "<div class=\"center\" align=\"center\">BlueStar theme by <a href=\"http://www.burningames.hu\">Burningames</a></div>";
echo "<div class=\"footer-subbox\">";
echo stripslashes($settings['footer']);
if (!$license) { echo "<br />\n".showcopyright(); }
echo "</div>\n";
echo "</td>\n";
echo "<td class=\"footer-right\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function render_news($subject, $news, $info) {
echo "<div class=\"news-title\"><h2>".$subject."</h2></div>\n";
echo "<div class=\"news-content\">".$news."</div>";
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"spacer\">\n";
echo "<tr>\n";
echo "<td class=\"fnews-left\"></td>\n";
echo "<td align=\"center\" class=\"fnews-middle\">\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "<td class=\"fnews-right\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function render_article($subject, $article, $info) {
opentable($subject);
echo "<div class=\"news-content\">".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>";
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"spacer\">\n";
echo "<tr>\n";
echo "<td class=\"fnews-left\"></td>\n";
echo "<td align=\"center\" class=\"fnews-middle\">\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n";
echo "<td class=\"fnews-right\"></td>\n";
echo "</tr>\n";
echo "</table>\n";
closetable();
}
function opentable($title) {
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"opentable-top\">\n";
echo "<tr>\n";
echo "<td class=\"title\">".$title."</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"opentable-body\">\n";
echo "<tr>\n";
echo "<td class=\"content\">\n";
}
function closetable() {
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
}
function openside($title, $collapse=false, $state="on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding=\"0\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"side-top\">\n";
echo "<tr>\n";
echo "<td class=\"title\">".$title."</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td align=\"right\">".panelbutton($state, $boxname)." </td>\n";
}
echo "</tr>\n";
echo "</table>\n";
echo "<table cellpadding=\"3\" styles='margin: 0 auto' cellspacing=\"0\" width=\"90%\" class=\"side-body\">\n<tr>\n";
echo "<td class=\"body\">\n";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
}
?>
styles.css:
/*BlueStar by Orosznyet*/
/*General tags*/
body {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #555555;
background: #f2f2f2;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
form {
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
img { border: 0px; }
a, a:visited, a.side { color: #0076cc; text-decoration: none; }
a:hover, a.side:hover { color: #40bde8; }
h1, h2, h3, h4, h5, h6 {
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
font-family: Georgia,"Bitstream Vera Serif","Times New Roman",serif;
}
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
h5 { font-size: 12px; }
h6 { font-size: 10px; }
hr {
background: #ebe4c6;
border: 1px solid #ebe4c6;
height: 1px;
}
/* Header classes and ids*/
.header-left {
background-image: url("images/header-left.png");
width: 34px;
height: 173px;
}
.header-right {
background-image: url("images/header-right.png");
width: 34px;
height: 173px;
}
.header-top {
background-image: url("images/header-center-top.png");
height: 23px;
text-align: right;
}
.header-logo {
background-image: url("images/header-center-logo.png");
height: 123px;
text-align: left;
}
#headsearch {
vertical-align: middle;
border: 1px solid #cccccc;
background-color: #f8f8f8;
margin: 0px auto 10px auto;
white-space: nowrap;
float: right;
}
.headsearchbox, .headsearchbutton {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #555555;
background-color: #f8f8f8;
border: 0px solid #cccccc;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
height: 16px;
}
.headsearchbox {
background: url("images/searchicon.gif") no-repeat;
padding: 0px 0px 0px 16px;
}
.header-navigation-top {
background-image: url("images/header-navigation-top.gif");
height: 24px;
text-align: left;
}
.header-navigation-bottom {
background-image: url("images/header-navigation-bottom.gif");
height: 3px;
}
.header-navigation-top ul{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
z-index: 30;
}
.header-navigation-top ul li{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
list-style: none;
float: left;
font: bold 12px arial;
}
.header-navigation-top ul .first-link { border-left: 1px solid #a1bdea; }
.header-navigation-top ul .first-link:hover { border-left: 1px solid #bdd0ee; }
.header-navigation-top ul .nav-item {
padding: 4px 8px 5px 5px;
text-decoration: none;
border-right: 1px solid #a1bdea;
display: block;
margin: 0px 0px 0px 0px;
font-weight: lighter;
}
.header-navigation-top ul .nav-item:hover {
background-image: url("images/header-navigation-tophover.gif");
border-right: 1px solid #bdd0ee;
font-weight: normal;
}
/* Main body and panels */
.body-left {
background-image: url("images/body-left.png");
width: 34px;
}
.body-right {
background-image: url("images/body-right.png");
width: 34px;
}
.panels-right, .panels-left {
width: 175px;
}
.body-main {
padding: 0px 10px 10px 10px;
}
/* Footer */
.footer-left {
background-image: url("images/footer-left.png");
background-repeat: no-repeat;
width: 62px;
}
.footer-center {
background-image: url("images/footer-center.png");
background-repeat: repeat-x;
padding: 10px 0px 0px 0px;
}
.footer-right {
background-image: url("images/footer-right.png");
background-repeat: no-repeat;
width: 62px;
}
.footer-subbox {
background-color: #fdfbe6;
border: 1px solid #fcf49d;
margin: 40px 20px 15px 20px;
text-align: center;
}
/* Panels*/
.opentable-top {
font-weight: bold;
background-color: #f3f0c4;
border-left: 1px solid #fdd44f;
border-bottom: 3px solid #fdd44f;
padding: 2px 0px 0px 4px;
}
.opentable-body { margin: 0px 0px 10px 0px; }
.panels-left .side-top { border-right: 3px solid #a5d9ec; border-left: 1px solid #a5d9ec;}
.panels-right .side-top { border-left: 3px solid #a5d9ec; border-right: 1px solid #a5d9ec; }
.side-top {
background-color: #e1f4fa;
font-weight: bold;
padding: 4px 0px 4px 6px;
}
.side-body { margin: 0px 0px 10px 0px; }
/* Forms */
.button {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555555;
background-color: #ececec;
height: 20px;
border: 1px solid #d7d7d7;
margin-top: 2px;
}
.bbcode {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #eeeeee;
border: 1px solid #cccccc;
margin-top: 2px;
}
.textbox {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555555;
background-color: #f8f8f8;
border: 1px solid #cccccc;
}
/* Page Navigation */
.pagenav {
padding: 4px;
}
.pagenav span {
color: #ffffff;
background-color: #f6a504;
border: 1px solid #dddddd;
padding: 2px 4px 2px 4px;
margin: 2px;
}
.pagenav a {
color: #555555;
background-color: #f1f1f1;
border: 1px solid #dddddd;
padding: 2px 4px 2px 4px;
margin: 2px;
text-decoration: none;
}
.pagenav a:hover {
color: #ffffff;
background-color: #fdd44f;
margin: 2px;
text-decoration: none;
}
/* Vertical Navigation */
#navigation h2 {
font-size: 11px;
font-weight: normal;
background-color: #f1f1f1;
margin: 0;
padding: 4px;
}
#navigation ul {
margin: 0;
padding: 0;
list-style-type: none;
}
* html #navigation ul li{
height: 1%;
}
#navigation a {
display: block;
color: #555555;
padding: 2px;
text-decoration: none;
}
#navigation a:hover {
color: #000000;
background-color: #fbe7b4;
}
/* Tables*/
.center {
margin: 0 auto;
}
.tbl-border {
border: 1px solid #e1e1e1;
}
.tbl {
font-size: 11px;
color: #555555;
background-color: #ffffff;
padding: 4px;
}
.tbl1 {
font-size: 11px;
color: #555555;
background-color: #ffffff;
padding: 4px;
}
.tbl2 {
font-size: 11px;
color: #555555;
background-color: #f1f1f1;
padding: 4px;
}
.forum-caption {
font-size: 11px;
font-weight: bold;
color: #888888;
background-color: #f1f1f1;
padding: 2px 4px 4px 4px;
}
.quote {
font-size: 11px;
color: #555555;
background-color: #f8f8f8;
padding: 4px;
margin: 0px 20px 0px 20px;
border: 1px solid #bbbbbb;
border-left: 5px solid #bbbbbb;
}
.poll {
height: 12px;
border: 1px solid #b7dded;
background-color: white;
}
.comment-name {
font-weight: bold;
color: #04688d;
}
.shoutboxname {
font-weight: bold;
color: #04688d;
}
.shoutbox {
color: #777777;
}
.shoutboxdate {
font-size: 10px;
color: #888888;
}
.small {
font-size: 10px;
font-weight: normal;
}
.small2 {
font-size: 10px;
font-weight: normal;
color: #555555;
}
/* Other */
.spacer { margin-bottom: 5px; }
.admin-message {
background-image: url("images/info-box.gif");
background-repeat: no-repeat;
background-position: 3px 50%;
border: 1px solid #C4C41A;
padding: 4px 4px 4px 20px;
margin: 15px auto 15px auto;
width: 70%;
background-color: #FFFF55;
}
/* News page */
.fnews-left {
background-image: url("images/news-left.gif");
background-repeat: no-repeat;
width: 5px;
height: 20px;
}
.fnews-middle {
background-image: url("images/news-middle.gif");
background-repeat: repeat-x;
height: 20px;
}
.fnews-right {
background-image: url("images/news-right.gif");
background-repeat: no-repeat;
width: 5px;
height: 20px;
}
.news-content {
padding: 10px 0px 10px 0px;
}
.news-title {
border-top: 3px dashed #e3e3e3;
padding: 5px 0px 0px 0px;
margin: 5px 0px 0px 0px;
}
.news-category {
float: right;
margin: -30px auto 5px auto;
}
Proszę o pomoc w wyśrodkowaniu theme'a BlueStar.
Pozdrawiam
Wojtek T.
Edytowane przez Pieka dnia 03.11.2009 15:23:20
www.e-Poniatowa.pl - widzisz błędy ? chętnie przyjmę pomoc na PW - oczywiście $.
"Tu nie ma drogi Uzytkowniku demokracji, przykro mi..."
|