Здравейте! Отново имам проблем, но този път със стилизирането на системата за новини..
Искам да сложа бекграунд на таблица чрез цсс, но не знам защо не става.. Моля, помогнете!
Не бързам за никъде!
Ето ЦСС И ХТМЛ:
CSS:
HTML:
Целта ми е да сложа бекграунд на заглавието на новината..
Искам да сложа бекграунд на таблица чрез цсс, но не знам защо не става.. Моля, помогнете!
Не бързам за никъде!
Ето ЦСС И ХТМЛ:
CSS:
Код:
html, body {height: 100%; background: url(../i/main.gif) repeat-y; width: 784px; margin: 0 auto; padding: 0px; text-decoration: none; font: 12px Tahoma;}
#container {background: url(../i/main.gif) repeat-y; width: 784px; margin: 0 auto; text-decoration: none; font: Tahoma 12px;}
#contm {margin: 0 0 0 14px;}
#header {width: 750px; height: 122px; background: url(../i/head.gif); margin: 0 0 0 3px;}
#menu {width: 750px; height: 26px; background: url(../i/menu/bck.gif); text-decoration: none; margin: 0 0 0 3px;}
#menum {color: #fff; text-decoration: none; padding-top: 4px;}
#menum a {color: #fff; text-decoration: none;}
#menum a:hover {color: #1a87ec; text-decoration: none;}
#content {background: url(../i/cont.gif) repeat-y; height: 700px; width: 750px; margin: 0 0 0 3px;}
#foot {background: url(../i/foot.png) center; width: 758px; height: 81px; font: 11px Tahoma; color: #fff; margin: 0 0 0 -1px;}
#ftext {color:#fff; text-decoration: none; font: 12px Arial;}
#ftext a {color: #fff; text-decoration: none;}
#ftext a:hover {color: #55b9ff; text-decoration: none;}
#text {width: 410px; margin: 0 auto; color: #99999; text-decoration: none;}
#text a {color: #99999; text-decoration: none;}
#text a:hover {color: #000; text-decoration: none;}
#text a:visited {color: #000; text-decoration: none;}
td.subTitle {background-image: url(../i/news.png); width: 456px; height: 26px;}
Код:
<html>
<head>
<title>ОУ "Христо Смирненски" - град Добрич</title>
<meta name="keywords" content="сайт, форум, училище, основно, христо, смирненски, град, добрич, българия, първи, втори, трети, четвърти, пети, шести, седми, клас" />
<meta name="description" content="Сайт на основно училище Христо Смирненски, град Добрич." />
<meta name="author" content="*****" />
<meta name="reply-to" content="***@abv.bg" />
<meta name="robots" content="index, follow" />
<link type="text/css" rel="Stylesheet" href="css/main.css" media="screen" />
</head>
<body>
<div id="container">
<div id="contm">
<div id="header"></div>
<div id="menu">
<div id="menum"><center>
<a href="index.html">Начало</a> |
<a href="../f">Форум</a> |
<a href="director.html">Директор</a> |
<a href="help.html">Помощни материали</a> |
<a href="teachers.html">Учители</a>
</center></div></div>
<div id="content">
<div id="text"><?php
require_once("connect.php");
$stranici = 10;
$pageNum = 1;
if(isset($_GET['page'])) {
$pageNum = $_GET['page']; }
$reds = ($pageNum - 1) * $stranici;
$query = " SELECT * FROM news ORDER BY id DESC" . " LIMIT $reds, $stranici";
$result = mysql_query($query);
while ($sql = mysql_fetch_object($result)) {
$title = $sql -> title;
$poqsnenie = $sql -> poqsnenie;
$novinata = $sql -> novinata;
$date = $sql -> date;
$id = $sql -> id;
echo "
<tr>
<center><td class='subTitle'><b>";
$title="$title";
$title=substr($title,0 , 40);
echo "<a href='view.php?id=$id'>$title</a>"." ...";
echo "</b></td></tr></center>
<tr>
<td class='mainTxt'>";
$poqsnenie = "$poqsnenie";
$poqsnenie = substr($poqsnenie,0 , 250);
echo $poqsnenie." <br /><a href='view.php?id=$id'>Научи повече...</a>";
echo "<hr width='595' size='1' color='#dadada' />
<div align='right'>
публикувано на $date ч
</div>
</td>
</tr>
<tr>
<td class='mainTxt'>"; }
$query = "SELECT COUNT(id) AS broi FROM news";
$result = mysql_query($query);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['broi'];
$maxPage = ceil($numrows/$stranici);
$self = $_SERVER['PHP_SELF'];
$nstranica = '';
for($page = 1; $page <= $maxPage; $page++) {
if ($page == $pageNum) {
$nstranica .= "<a href='#top' style='background-color:#313131;border:1px solid #C5C1B6;color: red;'><b>$page</b></a> ";
}
else {
$nstranica .= " <a href=\"$self?page=$page\">$page</a>";
}
}
if ($pageNum > 1) {
$page = $pageNum - 1;
$pred = " <a href=\"$self?page=$page\"> <b>«</b> </a>";
}
else {
$pred = ' ';
}
if ($pageNum < $maxPage) {
$page = $pageNum + 1;
$sled = " <a href=\"$self?page=$page\"> <b>»</b> </a>";
}
else {
$sled = ' ';
}
echo "<br /><br /><div class='pages'>". $pred . $nstranica . $sled;
echo '</div></td></tr>
<tr>
<td class="mainTxt">
<hr width="595" size="1" color="#f1f1f1" />
Последни коментари<br />
<small>Последните 5 публикувани коментара</small><br />';
$our = mysql_query("SELECT * FROM comment ORDER BY id DESC LIMIT 0,5");
while($r=mysql_fetch_array($our)){
echo '<a href="#"><b>'.$r['username'].':</b> <font color="red">'.$r['comment'].'</font></a><br />';
}
echo '
</td>
</tr>
<tr>
<td class="footer">Copyright © <b> n3w$ by</b> <a href="http://web-tourist.net">n0m3r1</a>
</td>
</tr>
</table><br />';
$our = mysql_query("SELECT count(id) as news_total FROM news");
?></div>
</div>
<div id="foot">
<div id="ftext">
<center>За училището:</center>
<center><br /> <a href="../f">Форум</a>
| <a href="director.html">Директор</a>
| <a href="teachers.html">Учители</a>
| <a href="hristosmirnenski.html">Христо Смирненски</center>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Целта ми е да сложа бекграунд на заглавието на новината..