Wyśrodkowanie zmodyfikowanej skórki
|
BenLomax |
Dodany dnia 28.10.2008 09:17:10
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
Mam do Was prośbę, pomóżcie wyśrodkować mojego thema :)
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class='bullet'><img src='".THEME."images/bullet.gif' alt='bullet' border='0'/></span>");
define("THEME_WIDTH", "940px");
require_once INCLUDES."theme_functions_include.php";
function render_page($license=false) {
global $settings, $main_style, $locale;
//Header
echo "<div class='side-background'>
<div class='side-b'>
<div class='side-t'>
<div class='side-r'>
<div class='side-l'>
<div class='side-b-r'>
<div class='side-t-r'>
<div class='side-b-l'>
<div class='side-t-l'><table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'>\n<tr>\n";
echo "<tr>
<td align='left' class='logo' colspan='2'height='210'></td>
</tr>";
// Menus Starts
echo '<table width="940" height="30" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#F5FFE4" bgcolor="#F5FFE4" id="Table_02">
<tr>
<td><a href="'.BASEDIR.'index.php">
<img src="'.THEME.'images/menu_01.gif" onMouseOver=this.src="'.THEME.'images/menu_01a.gif" onMouseOut=this.src="'.THEME.'images/menu_01.gif" width="92" height="30 alt="strona główna" border="0"/></td>
<td><a href="'.BASEDIR.'news.php">
<img src="'.THEME.'images/menu_02.gif" onMouseOver=this.src="'.THEME.'images/menu_02a.gif" onMouseOut=this.src="'.THEME.'images/menu_02.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'viewpage.php?page_id=1">
<img src="'.THEME.'images/menu_03.gif" onMouseOver=this.src="'.THEME.'images/menu_03a.gif" onMouseOut=this.src="'.THEME.'images/menu_03.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'viewpage.php?page_id=2">
<img src="'.THEME.'images/menu_04.gif" onMouseOver=this.src="'.THEME.'images/menu_04a.gif" onMouseOut=this.src="'.THEME.'images/menu_04.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'photogallery.php">
<img src="'.THEME.'images/menu_05.gif" onMouseOver=this.src="'.THEME.'images/menu_05a.gif" onMouseOut=this.src="'.THEME.'images/menu_05.gif" width="77" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'news_cats.php">
<img src="'.THEME.'images/menu_06.gif" onMouseOver=this.src="'.THEME.'images/menu_06a.gif" onMouseOut=this.src="'.THEME.'images/menu_06.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'kgosci.php">
<img src="'.THEME.'images/menu_07.gif" onMouseOver=this.src="'.THEME.'images/menu_07a.gif" onMouseOut=this.src="'.THEME.'images/menu_07.gif" width="81" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'forum/index.php">
<img src="'.THEME.'images/menu_08.gif" onMouseOver=this.src="'.THEME.'images/menu_08a.gif" onMouseOut=this.src="'.THEME.'images/menu_08.gif" width="52" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'weblinks.php">
<img src="'.THEME.'images/menu_09.gif" onMouseOver=this.src="'.THEME.'images/menu_09a.gif" onMouseOut=this.src="'.THEME.'images/menu_09.gif" width="52" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'contact.php">
<img src="'.THEME.'images/menu_10.gif" onMouseOver=this.src="'.THEME.'images/menu_10a.gif" onMouseOut=this.src="'.THEME.'images/menu_10.gif" width="57" height="30" alt="" border="0" /></td>
';
if (iMEMBER) {
echo ' <td><a href="'.BASEDIR.'setuser.php?logout=yes">
<img src="'.THEME.'images/menu_log.gif" onMouseOver=this.src="'.THEME.'images/menu_loga.gif" onMouseOut=this.src="'.THEME.'images/menu_log.gif" width="75" height="30" alt="" border="0" /></td>';
} else {
echo ' <td><a href="'.BASEDIR.'register.php">
<img src="'.THEME.'images/menu_out.gif" onMouseOver=this.src="'.THEME.'images/menu_outa.gif" onMouseOut=this.src="'.THEME.'images/menu_out.gif" width="75" height="30" alt="" border="0" /></td>';
}
echo '<td background="'.THEME.'images/menu_22.jpg" width="118" height="30"><font color="white" class="date" style="margin-left:22px"><small>'.showsubdate().'</small></font> </td>
</tr>
</table>
';
// Menu Ends
//Content
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center' class='$main_style'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td align='left' class='sub-header'>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</td>\n";
echo "<td align='right' class='sub-header'>".showcounter()."</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' class='main-footer'>".stripslashes($settings['footer']);
echo "<p><a href='http://polish-142204956908.spampoison.com'><img src='http://pics4.inxhost.com/images/sticker.gif' border='0' width='80' height='15'/></a>";
if (!$license) { echo "<br /><br />\n".showcopyright(); }
echo "</td>\n";
echo "</tr>\n</table> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>\n";
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".$news."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer middle-border'>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#CAF055;'></td>\n";
echo "</tr>\n</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n</tr>\n</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$title."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#CAF055;'></td>\n";
echo "</tr>\n</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='scapmain-left'></td>\n";
echo "<td class='scapmain'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='scapmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side-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";
}
?>
Kliknij i zaczekaj na załadowanie kodu ... |
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 21:07:25
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
shaiboos |
Dodany dnia 28.10.2008 09:58:29
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
Normalnie, aby wyśrodkować diva najprościej nadać mu atrybut margin: auto;. Następnie sekcji body dodać text-align: center;.
Czyli w pliku CSS w tym przypadku dla klasy side-background dajesz margin: auto; no i dla body text-align: center;.
Wydaje się, że to o to chodziło - jeżeli nie to dalej będziemy myśleć. |
|
|
|
BenLomax |
Dodany dnia 28.10.2008 10:14:59
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
Zamysł dobry, ale jak dam:
body text-align: center;
Kliknij i zaczekaj na załadowanie kodu ...
to strona się wyśrodkuje razem z całym tekstem na niej
Edytowane przez Pieka dnia 28.10.2008 16:22:28
|
|
|
|
shaiboos |
Dodany dnia 28.10.2008 10:39:52
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
W CSS występuje zjawisko dziedziczenia. Aby uniknąć środkowania całej zawartości wystarczy nadać text-align: left; czyli wyrównywanie do lewej dla pojemnika side-background. Powinno wystarczyć, bo każdy podrzędny pojemnik przyjmie właściwość po nim. |
|
|
|
BenLomax |
Dodany dnia 28.10.2008 10:54:58
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
Teraz to już nie pojmuję. Zobacz to mój plik css
/* Comment element properties */
a {
color: #663300;
text-decoration: none;
}
a:hover {
color: #666600;
text-decoration: underline;
}
a.side {
color: #555;
text-decoration: none;
}
a:hover.side {
color: #66CC00;
text-decoration: underline;
}
a.white, li.white a {
color: #660000;
text-decoration: none;
}
a:hover.white, li.white a:hover {
color: #669900;
text-decoration: underline;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
background-image: url(images/background.gif);
margin: 20px;
}
hr {
height: 1px;
border: 1px solid #e8fdc3;
}
hr.side-hr {
height: 1px;
border: 1px solid #e8fdc3;
}
td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
pre {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.alt {
color: #669900;
}
.spacer {
margin-bottom: 5px;
}
.admin-message {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
color: #660000;
background-color: #F5FFE4;
border: 1px solid #e1e1e1;
padding: 3px 4px 5px 4px;
margin-bottom: 5px;
}
/* Form element properties */
form {
margin: 0px;
}
.button {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #660000;
background-color: #e8fdc3;
height: 20px;
border: 1px solid #000;
margin-top: 2px;
}
.bbcode {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000 ;
background-color: #e8fdc3;
border: 1px solid #ccc;
margin-top: 2px;
}
.textbox {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555;
background-color: #F5FFE4;
border: 1px solid #ccc;
}
/* Header and footer properties */
.sub-header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666600;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
padding: 7px 5px 8px 5px;
font-weight: bold;
}
.sub-header-left {
width: 3px;
height: 30px;
background-color: #555;
background-image: url(images/cap-left.gif);
}
.sub-header-right {
width: 3px;
height: 30px;
background-color: #555;
background-image: url(images/cap-right.gif);
}
.sub-header ul{
margin: 0;
padding: 0;
}
.sub-header ul li{
display: inline;
}
.sub-header ul li.first-link .bullet{
display: none;
}
.full-header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000;
background-color: #F5FFE4; /* logo */
padding: 5px 0 50px 0;
}
.main-footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555;
background-color: #F5FFE4;
padding: 5px;
}
.bottom-footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #fff;
background-color: #555;
padding: 4px 4px 5px 4px;
}
.main-body {
font-size: 11px;
color: #555;
background-color: #F5FFE4;
border: 1px solid #660000;
padding: 4px;
background-image: url(images/gradient3.gif);
background-repeat: repeat-x;
}
/* Side-Panel properties */
.side-left .side-border-right {display: none;}
.side-right .side-border-left {display: none;}
.side-border-left {
color: #777;
background-color: #F5FFE4;
padding: 10px 10px 10px 0;
width: 175px;
}
.side-border-right {
color: #777;
background-color: #F5FFE4;
padding: 10px 0 10px 10px;
width: 175px;
}
.scapmain {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
color: #660033;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
padding: 6px 4px 6px 4px;
}
.scapmain-left {
width: 3px;
height: 24px;
background-color: transparent;
background-image: url(images/cap-left.gif);
}
.scapmain-right {
width: 3px;
height: 24px;
background-color: transparent;
background-image: url(images/cap-right.gif);
}
.side-body {
font-size: 10px;
color: #555;
background-color: #F5FFE4;
background-image: url(images/gradient3.gif);
background-repeat: repeat-x;
border: 1px solid #669900;
padding: 4px;
text-align: left;
}
/* Center-Panel properties */
.news-category {
border: 0;
margin: 3px 5px 0 0;
float: left;
}
.news-footer {
font-size: 10px;
color: #555;
background-color: #e8fdc3;
border-width: 0 1px 1px 1px;
border-color: #660000;
border-style: solid;
padding: 3px 4px 4px 4px;
}
.capmain {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
color: #660000;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
}
.capmain-left {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap-left.gif);
}
.capmain-right {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap-right.gif);
}
.capmain2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
color: #F5FFE4;
background-color: #555;
background-image: url(images/cap2.gif);
background-repeat: repeat-x;
}
.capmain2-left {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap2-left.gif);
}
.capmain2-right {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap2-right.gif);
}
.main-bg {
color: #555;
background-color: #F5FFE4;
padding: 10px 0 5px 0;
}
/* General table properties */
.center {
margin: 0 auto;
}
.tbl-border {
background-color: #99CC66;
}
.tbl {
font-size:11px;
padding:3px 4px 3px 4px;
}
.tbl1 {
font-size:11px;
color:#323232;
background-color:#F5FFE4;
padding:4px;
}
.tbl2 {
font-size:11px;
color:#323232;
background-color:#F5FFE4;
padding:4px;
}
.forum-caption {
font-size: 12px;
font-weight: bold;
color: #669900;
background-color: #e8fdc3;
padding: 2px 4px 4px 4px;
border-top: 1px solid #669900;
border-bottom: 1px solid #669900;
background-image: url(images/forum-caption.gif);
height: 30px;
}
.quote {
font-size: 11px;
color: #660000;
background-color: #e8fdc3;
padding: 4px;
margin: 0px 20px 0px 20px;
border: 1px solid #bbb;
}
.poll {
height: 12px;
border: 1px solid #669933;
}
.comment-name {
font-weight: bold;
color: #669900;
}
.shoutboxname {
font-weight: bold;
color: #669900;
}
.shoutbox {
color: #990000;
font-weight: bold;
}
.shoutboxdate {
font-size: 10px;
font-style: italic;
color: #888;
}
.small {
font-size: 10px;
font-weight: normal;
}
.small2 {
font-size: 10px;
font-weight: normal;
color: #555;
}
.side-small {
font-size: 10px;
font-weight: normal;
color: #555;
}
.side-label {
color: #555;
background-color: #e8fdc3;
margin: 2px 0 2px 0;
padding: 2px 2px 3px 2px;
border: 1px solid #669933;
}
/* Vertical Navigation */
#navigation h2 {
font-size: 10px;
font-weight: bold;
background-color: transparent;
margin: 0;
padding: 4px;
text-align: center
}
#navigation ul {
margin: 0;
padding: 0;
list-style-type: none;
}
* html #navigation ul li{
height: 1%;
}
#navigation a {
display: block;
color: #555;
padding: 2px;
text-decoration: none;
}
#navigation a:hover {
color: #fff;
background-color: #669900;
}
/* Page Navigation */
.pagenav {
padding: 4px;
}
.pagenav span {
color: #fff;
background-color: #669900;
border: 1px solid #ddd;
padding: 2px 4px 2px 4px;
margin: 2px;
}
.pagenav a {
color: #555;
background-color: #f1f1f1;
border: 1px solid #ddd;
padding: 2px 4px 2px 4px;
margin: 2px;
text-decoration: none;
}
.pagenav a:hover {
color: #fff;
background-color: #669900;
margin: 2px;
text-decoration: none;
}
.side-r {
background: transparent url(images/prawy_brzeg.gif) repeat-y right;
height: auto;
}
.side-l {
background: transparent url(images/lewy_brzeg.gif) repeat-y left;
height: auto;
}
.side-t {
background: transparent url(images/gorny_brzeg.gif) repeat-x top;
height: auto;
width: 965px;
}
.side-b {
background: transparent url(images/dolny_brzeg.gif) repeat-x bottom;
height: auto;
width: 965px;
}
.side-b-r {
background: transparent url(images/dolny_prawy_rog.gif) no-repeat right bottom;
height: auto;
}
.side-t-r {
background: transparent url(images/gorny_prawy_rog.gif) no-repeat top right;
height: auto;
}
.side-b-l {
background: transparent url(images/dolny_lewy_rog.gif) no-repeat left bottom;
height: auto;
}
.side-t-l {
background: transparent url(images/gorny_lewy_rog.gif) no-repeat top left;
height: auto;
padding: 15px;
}
.logo { background-color: #F5FFE4;
background: #F5FFE4 url(images/logo.jpg) no-repeat center;
border-style: none
}
Kliknij i zaczekaj na załadowanie kodu ...
Co byś zmienił? |
|
|
|
shaiboos |
Dodany dnia 28.10.2008 11:09:23
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
W themie masz <div class='side-background'> w pliku CSS nie widzę tej klasy - Jeżeli ten div nie jest obecnie za nic odpowiedzialny, a obejmuje wszystkie inne elementy strony (a na to wygląda) to dodaj w css klasę
.side-background {
margin: auto;
text-align: left;
}
Kliknij i zaczekaj na załadowanie kodu ...
a do klasy body dodaj linijkę
text-align: center;
Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez Pieka dnia 28.10.2008 16:23:06
|
|
|
|
BenLomax |
Dodany dnia 28.10.2008 11:20:33
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
Zrobiłem tak:
.side-background {
margin: auto;
text-align: left;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
background-image: url(images/background.gif);
margin: 20px;
text-align: center;
}
Kliknij i zaczekaj na załadowanie kodu ...
i nic. |
|
|
|
shaiboos |
Dodany dnia 28.10.2008 12:09:13
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
Ale namotałem. Przepraszam, ale wprowadziłem Cię w błąd.
Text-align nie będzie potrzebne.
Widać theme ma stałą szerokość 940px, stwórz więc diva obejmującego wszystko i określ mu w stylach szerokość na te 940px i daj mu margin: auto;. Może tak zadziała. |
|
|
|
BenLomax |
Dodany dnia 28.10.2008 13:00:32
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
Eeeee...A jak? |
|
|
|
shaiboos |
Dodany dnia 28.10.2008 13:37:17
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
Theme.php
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
define("THEME_BULLET", "<span class='bullet'><img src='".THEME."images/bullet.gif' alt='bullet' border='0'/></span>");
define("THEME_WIDTH", "940px");
require_once INCLUDES."theme_functions_include.php";
function render_page($license=false) {
global $settings, $main_style, $locale;
//Header
echo "
<div class='center_page'>
<div class='side-background'>
<div class='side-b'>
<div class='side-t'>
<div class='side-r'>
<div class='side-l'>
<div class='side-b-r'>
<div class='side-t-r'>
<div class='side-b-l'>
<div class='side-t-l'><table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'>\n<tr>\n";
echo "<tr>
<td align='left' class='logo' colspan='2'height='210'></td>
</tr>";
// Menus Starts
echo '<table width="940" height="30" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#F5FFE4" bgcolor="#F5FFE4" id="Table_02">
<tr>
<td><a href="'.BASEDIR.'index.php">
<img src="'.THEME.'images/menu_01.gif" onMouseOver=this.src="'.THEME.'images/menu_01a.gif" onMouseOut=this.src="'.THEME.'images/menu_01.gif" width="92" height="30 alt="strona główna" border="0"/></td>
<td><a href="'.BASEDIR.'news.php">
<img src="'.THEME.'images/menu_02.gif" onMouseOver=this.src="'.THEME.'images/menu_02a.gif" onMouseOut=this.src="'.THEME.'images/menu_02.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'viewpage.php?page_id=1">
<img src="'.THEME.'images/menu_03.gif" onMouseOver=this.src="'.THEME.'images/menu_03a.gif" onMouseOut=this.src="'.THEME.'images/menu_03.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'viewpage.php?page_id=2">
<img src="'.THEME.'images/menu_04.gif" onMouseOver=this.src="'.THEME.'images/menu_04a.gif" onMouseOut=this.src="'.THEME.'images/menu_04.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'photogallery.php">
<img src="'.THEME.'images/menu_05.gif" onMouseOver=this.src="'.THEME.'images/menu_05a.gif" onMouseOut=this.src="'.THEME.'images/menu_05.gif" width="77" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'news_cats.php">
<img src="'.THEME.'images/menu_06.gif" onMouseOver=this.src="'.THEME.'images/menu_06a.gif" onMouseOut=this.src="'.THEME.'images/menu_06.gif" width="74" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'kgosci.php">
<img src="'.THEME.'images/menu_07.gif" onMouseOver=this.src="'.THEME.'images/menu_07a.gif" onMouseOut=this.src="'.THEME.'images/menu_07.gif" width="81" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'forum/index.php">
<img src="'.THEME.'images/menu_08.gif" onMouseOver=this.src="'.THEME.'images/menu_08a.gif" onMouseOut=this.src="'.THEME.'images/menu_08.gif" width="52" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'weblinks.php">
<img src="'.THEME.'images/menu_09.gif" onMouseOver=this.src="'.THEME.'images/menu_09a.gif" onMouseOut=this.src="'.THEME.'images/menu_09.gif" width="52" height="30" alt="" border="0" /></td>
<td><a href="'.BASEDIR.'contact.php">
<img src="'.THEME.'images/menu_10.gif" onMouseOver=this.src="'.THEME.'images/menu_10a.gif" onMouseOut=this.src="'.THEME.'images/menu_10.gif" width="57" height="30" alt="" border="0" /></td>
';
if (iMEMBER) {
echo ' <td><a href="'.BASEDIR.'setuser.php?logout=yes">
<img src="'.THEME.'images/menu_log.gif" onMouseOver=this.src="'.THEME.'images/menu_loga.gif" onMouseOut=this.src="'.THEME.'images/menu_log.gif" width="75" height="30" alt="" border="0" /></td>';
} else {
echo ' <td><a href="'.BASEDIR.'register.php">
<img src="'.THEME.'images/menu_out.gif" onMouseOver=this.src="'.THEME.'images/menu_outa.gif" onMouseOut=this.src="'.THEME.'images/menu_out.gif" width="75" height="30" alt="" border="0" /></td>';
}
echo '<td background="'.THEME.'images/menu_22.jpg" width="118" height="30"><font color="white" class="date" style="margin-left:22px"><small>'.showsubdate().'</small></font> </td>
</tr>
</table>
';
// Menu Ends
//Content
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center' class='$main_style'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td align='left' class='sub-header'>".sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4))."</td>\n";
echo "<td align='right' class='sub-header'>".showcounter()."</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td align='center' class='main-footer'>".stripslashes($settings['footer']);
echo "<p><a href='http://polish-142204956908.spampoison.com'><img src='http://pics4.inxhost.com/images/sticker.gif' border='0' width='80' height='15'/></a>";
if (!$license) { echo "<br /><br />\n".showcopyright(); }
echo "</td>\n";
echo "</tr>\n</table> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>\n";
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".$news."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer middle-border'>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#CAF055;'></td>\n";
echo "</tr>\n</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "</tr>\n<tr>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n</tr>\n</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$title."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:2px;background-color:#CAF055;'></td>\n";
echo "</tr>\n</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='scapmain-left'></td>\n";
echo "<td class='scapmain'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='scapmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side-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";
}
?>
Kliknij i zaczekaj na załadowanie kodu ...
styles.css
/* Comment element properties */
a {
color: #663300;
text-decoration: none;
}
a:hover {
color: #666600;
text-decoration: underline;
}
a.side {
color: #555;
text-decoration: none;
}
a:hover.side {
color: #66CC00;
text-decoration: underline;
}
a.white, li.white a {
color: #660000;
text-decoration: none;
}
a:hover.white, li.white a:hover {
color: #669900;
text-decoration: underline;
}
.center_page {
width: 940px;
margin: auto;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
background-image: url(images/background.gif);
margin: 20px;
}
hr {
height: 1px;
border: 1px solid #e8fdc3;
}
hr.side-hr {
height: 1px;
border: 1px solid #e8fdc3;
}
td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
pre {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
.alt {
color: #669900;
}
.spacer {
margin-bottom: 5px;
}
.admin-message {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
color: #660000;
background-color: #F5FFE4;
border: 1px solid #e1e1e1;
padding: 3px 4px 5px 4px;
margin-bottom: 5px;
}
/* Form element properties */
form {
margin: 0px;
}
.button {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #660000;
background-color: #e8fdc3;
height: 20px;
border: 1px solid #000;
margin-top: 2px;
}
.bbcode {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000 ;
background-color: #e8fdc3;
border: 1px solid #ccc;
margin-top: 2px;
}
.textbox {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555;
background-color: #F5FFE4;
border: 1px solid #ccc;
}
/* Header and footer properties */
.sub-header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666600;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
padding: 7px 5px 8px 5px;
font-weight: bold;
}
.sub-header-left {
width: 3px;
height: 30px;
background-color: #555;
background-image: url(images/cap-left.gif);
}
.sub-header-right {
width: 3px;
height: 30px;
background-color: #555;
background-image: url(images/cap-right.gif);
}
.sub-header ul{
margin: 0;
padding: 0;
}
.sub-header ul li{
display: inline;
}
.sub-header ul li.first-link .bullet{
display: none;
}
.full-header {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000;
background-color: #F5FFE4; /* logo */
padding: 5px 0 50px 0;
}
.main-footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #555;
background-color: #F5FFE4;
padding: 5px;
}
.bottom-footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #fff;
background-color: #555;
padding: 4px 4px 5px 4px;
}
.main-body {
font-size: 11px;
color: #555;
background-color: #F5FFE4;
border: 1px solid #660000;
padding: 4px;
background-image: url(images/gradient3.gif);
background-repeat: repeat-x;
}
/* Side-Panel properties */
.side-left .side-border-right {display: none;}
.side-right .side-border-left {display: none;}
.side-border-left {
color: #777;
background-color: #F5FFE4;
padding: 10px 10px 10px 0;
width: 175px;
}
.side-border-right {
color: #777;
background-color: #F5FFE4;
padding: 10px 0 10px 10px;
width: 175px;
}
.scapmain {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
color: #660033;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
padding: 6px 4px 6px 4px;
}
.scapmain-left {
width: 3px;
height: 24px;
background-color: transparent;
background-image: url(images/cap-left.gif);
}
.scapmain-right {
width: 3px;
height: 24px;
background-color: transparent;
background-image: url(images/cap-right.gif);
}
.side-body {
font-size: 10px;
color: #555;
background-color: #F5FFE4;
background-image: url(images/gradient3.gif);
background-repeat: repeat-x;
border: 1px solid #669900;
padding: 4px;
text-align: left;
}
/* Center-Panel properties */
.news-category {
border: 0;
margin: 3px 5px 0 0;
float: left;
}
.news-footer {
font-size: 10px;
color: #555;
background-color: #e8fdc3;
border-width: 0 1px 1px 1px;
border-color: #660000;
border-style: solid;
padding: 3px 4px 4px 4px;
}
.capmain {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
color: #660000;
background-color: #555;
background-image: url(images/cap.gif);
background-repeat: repeat-x;
}
.capmain-left {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap-left.gif);
}
.capmain-right {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap-right.gif);
}
.capmain2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
color: #F5FFE4;
background-color: #555;
background-image: url(images/cap2.gif);
background-repeat: repeat-x;
}
.capmain2-left {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap2-left.gif);
}
.capmain2-right {
width: 3px;
height: 25px;
background-color: #555;
background-image: url(images/cap2-right.gif);
}
.main-bg {
color: #555;
background-color: #F5FFE4;
padding: 10px 0 5px 0;
}
/* General table properties */
.center {
margin: 0 auto;
}
.tbl-border {
background-color: #99CC66;
}
.tbl {
font-size:11px;
padding:3px 4px 3px 4px;
}
.tbl1 {
font-size:11px;
color:#323232;
background-color:#F5FFE4;
padding:4px;
}
.tbl2 {
font-size:11px;
color:#323232;
background-color:#F5FFE4;
padding:4px;
}
.forum-caption {
font-size: 12px;
font-weight: bold;
color: #669900;
background-color: #e8fdc3;
padding: 2px 4px 4px 4px;
border-top: 1px solid #669900;
border-bottom: 1px solid #669900;
background-image: url(images/forum-caption.gif);
height: 30px;
}
.quote {
font-size: 11px;
color: #660000;
background-color: #e8fdc3;
padding: 4px;
margin: 0px 20px 0px 20px;
border: 1px solid #bbb;
}
.poll {
height: 12px;
border: 1px solid #669933;
}
.comment-name {
font-weight: bold;
color: #669900;
}
.shoutboxname {
font-weight: bold;
color: #669900;
}
.shoutbox {
color: #990000;
font-weight: bold;
}
.shoutboxdate {
font-size: 10px;
font-style: italic;
color: #888;
}
.small {
font-size: 10px;
font-weight: normal;
}
.small2 {
font-size: 10px;
font-weight: normal;
color: #555;
}
.side-small {
font-size: 10px;
font-weight: normal;
color: #555;
}
.side-label {
color: #555;
background-color: #e8fdc3;
margin: 2px 0 2px 0;
padding: 2px 2px 3px 2px;
border: 1px solid #669933;
}
/* Vertical Navigation */
#navigation h2 {
font-size: 10px;
font-weight: bold;
background-color: transparent;
margin: 0;
padding: 4px;
text-align: center
}
#navigation ul {
margin: 0;
padding: 0;
list-style-type: none;
}
* html #navigation ul li{
height: 1%;
}
#navigation a {
display: block;
color: #555;
padding: 2px;
text-decoration: none;
}
#navigation a:hover {
color: #fff;
background-color: #669900;
}
/* Page Navigation */
.pagenav {
padding: 4px;
}
.pagenav span {
color: #fff;
background-color: #669900;
border: 1px solid #ddd;
padding: 2px 4px 2px 4px;
margin: 2px;
}
.pagenav a {
color: #555;
background-color: #f1f1f1;
border: 1px solid #ddd;
padding: 2px 4px 2px 4px;
margin: 2px;
text-decoration: none;
}
.pagenav a:hover {
color: #fff;
background-color: #669900;
margin: 2px;
text-decoration: none;
}
.side-r {
background: transparent url(images/prawy_brzeg.gif) repeat-y right;
height: auto;
}
.side-l {
background: transparent url(images/lewy_brzeg.gif) repeat-y left;
height: auto;
}
.side-t {
background: transparent url(images/gorny_brzeg.gif) repeat-x top;
height: auto;
width: 965px;
}
.side-b {
background: transparent url(images/dolny_brzeg.gif) repeat-x bottom;
height: auto;
width: 965px;
}
.side-b-r {
background: transparent url(images/dolny_prawy_rog.gif) no-repeat right bottom;
height: auto;
}
.side-t-r {
background: transparent url(images/gorny_prawy_rog.gif) no-repeat top right;
height: auto;
}
.side-b-l {
background: transparent url(images/dolny_lewy_rog.gif) no-repeat left bottom;
height: auto;
}
.side-t-l {
background: transparent url(images/gorny_lewy_rog.gif) no-repeat top left;
height: auto;
padding: 15px;
}
.logo { background-color: #F5FFE4;
background: #F5FFE4 url(images/logo.jpg) no-repeat center;
border-style: none
}
Kliknij i zaczekaj na załadowanie kodu ...
Jeżeli nie zadziała, to spróbuję w domu pokombinować już w praktyce... To będzie po 17.
edit: Porobiło się przy kopiowaniu trochę niepotrzebnych pustych wierszy.
Edytowane przez shaiboos dnia 28.10.2008 13:39:29
|
|
|
|
BenLomax |
Dodany dnia 28.10.2008 13:56:27
|
Bywalec
Postów: 426 Pomógł: 25 Ostrzeżeń: 1
Data rejestracji: 25.06.2008 09:48
|
:D działa! :) WIELKIE dzięki za pomoc i wytrwałość! Mam nadzieje,że nie będę musiał wracać do tego tematu :@
Wiadomość doklejona:
BenLomax napisał/a:
:D działa! :) WIELKIE dzięki za pomoc i wytrwałość! Mam nadzieje,że nie będę musiał wracać do tego tematu :@
PS,tak dla informacji, dodałeś w theme.php:
//Header
echo "<div class='center_page'>
Kliknij i zaczekaj na załadowanie kodu ...
a w style.css:
.center_page {
width: 970px;
margin: auto;
}
Kliknij i zaczekaj na załadowanie kodu ...
Czy coś jeszcze ?
Edytowane przez Pieka dnia 28.10.2008 16:24:09
|
|
|
|
shaiboos |
Dodany dnia 28.10.2008 14:31:55
|
Przedszkolak
Postów: 72 Pomógł: 3
Data rejestracji: 17.09.2004 20:26
|
W theme.php jeszcze zamknąłem tego diva, zamknięcie jest w sekcji z komentarzem //footer tam gdzie zamykanych jest 9 innych divów (czyli teraz już 10).
Edytowane przez Pieka dnia 28.10.2008 16:24:35
|
|
|