Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML]Jak zrobić i umieścić box na banery
Forum PHP.pl > Forum > Przedszkole
danuta47
Witam Wiem że to banalne ale jak próbuję sama coś zrobić to cała strona mi się rozwala albo mam jedno na drugim sad.gif .
Zależy mi żeby zrobić 2 jednakowe boxy z lewej i prawej strony . Dokładnie to o co mi chodzi przedstawiłam poniżej :



Z góry dziękuję za pomoc
erix
Bez kodu, to możemy sobie powróżyć. winksmiley.jpg

IMHO kontener na szerokość 60%, dwie kolumny na bok po 15%, ale więcej nie powiem, bo szklana kula na nartach. ;P
danuta47
Ok smile.gif tak myślałam że będzie potrzebny , już podaję cały kod :
  1. <? include("db_connect.php");
  2. include("function.php");
  3. include("ust.php");
  4. include("adm/namen.php");
  5. ?>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  8. <head><meta name="verify-v1" content="z48UTJoksu6eUnr+j0DECPlhQb8fRBCdlBKDM+x87bg=" /><!-- TradeDoubler site verification 1582835 -->
  9. <title><? if($_GET['q']!=""){echo mplus($_GET['q']).' - ';} echo $ust['title'];?></title>
  10. <meta name="Description" content="<? echo $ust['desc']; ?>" />
  11. <meta name="Keywords" content="<? echo $ust['key']; ?>" />
  12. <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  13. <link rel="stylesheet" href="images/style.css" type="text/css" />
  14. </head>
  15. <script language="JavaScript" type="text/javascript">
  16.  
  17. function spr(aform){
  18.  
  19. if(aform.q.value==""){
  20. alert("Podaj tytul piosenki");
  21. return false;
  22. }
  23.  
  24. }
  25. <div class="content">
  26. <div class="header_top"></div>
  27. <div class="header">
  28. <div class="sf_right">
  29. <div id="nav">
  30. <ul>
  31. <li><a href="index.html">Home</a></li>
  32. <? if($ust['onas']!=""){ ?><li><a href="onas.html">O Nas</a></li><?}?>
  33. <? if($ust['regulamin']!=""){ ?><li><a href="regulamin.html">Regulamin</a></li><?}?>
  34. <? if($ust['kontakt']!=""){ ?><li><a href="kontakt.html">Kontakt</a></li><?}?>
  35.  
  36. </ul>
  37. </div>
  38. <div class="sf_search">
  39. <form method="GET" action="do.php" onSubmit="return spr(this)">
  40. <p><b>Szukaj:</b>
  41. <input type="text" name="q" class="search" />
  42. <input type="submit" value="Go" class="submit" />
  43. </p>
  44. </form>
  45. </div>
  46. </div>
  47. <div class="sf_left">
  48. <h1><a href="">MP3RADIO <a href="http://www.alefirmy.pl"><img src="http://www.liczniki.wabi.pl/licznik.php?user=mp3radio" alt="Liczniki" border="0"></a></a></h1>
  49. </div>
  50. </div>
  51. <div class="header_bottom"></div>
  52. <div class="subheader">
  53.  
  54.  
  55. <script type="text/javascript"><!--
  56. google_ad_client = "pub-2740713983958791";
  57. /* 728x90, utworzono 08-11-12 */
  58. google_ad_slot = "9765793333";
  59. google_ad_width = 728;
  60. google_ad_height = 90;
  61. //-->
  62. <script type="text/javascript"
  63. src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  64. <p></p>
  65. </div>
  66. <div class="header_top"></div>
  67. <div class="left">
  68. <div class="left_side">
  69. <div class="box_top">
  70. <h2><a href="popularne.html">Popularne</a></h2>
  71. </div>
  72. <div class="box">
  73. <p><? include("public/naj.php"); ?></p>
  74. </div>
  75. <div class="box_bottom"></div>
  76. </div>
  77. <div class="right_side">
  78. <? if($_GET['action']=="szukaj")
  79. {
  80. echo'
  81. <div class="article">
  82. <h2>Znaleziono:</h2>
  83. <h3></h3>
  84. <p>
  85. ';
  86. include("public/search.php");
  87. echo'
  88. </p>
  89. </div>
  90. ';
  91. }
  92. else if($_GET['action']=="kontakt")
  93. {
  94. echo'
  95. <div class="article">
  96. <h2>Kontakt</h2>
  97. <h3></h3>
  98. <p>
  99. '.nl2br($ust['kontakt']).'
  100. </p>
  101. </div>
  102. ';
  103. }
  104. else if($_GET['action']=="onas")
  105. {
  106. echo'
  107. <div class="article">
  108. <h2>O Nas</h2>
  109. <h3></h3>
  110. <p>
  111. '.nl2br($ust['onas']).'
  112. </p>
  113. </div>
  114. ';
  115. }
  116. else if($_GET['action']=="regulamin")
  117. {
  118. echo'
  119. <div class="article">
  120. <h2>Regulamin</h2>
  121. <h3></h3>
  122. <p>
  123. '.nl2br($ust['regulamin']).'
  124. </p>
  125. </div>
  126. ';
  127. }
  128. else if($_GET['action']=="index" or $_GET['action']=="")
  129. {
  130. if($ust['index']!="")
  131. {
  132. echo'
  133. <div class="article">
  134. <h2></h2>
  135. <h3></h3>


Przepraszam za post pod postem ale caly kod sie nie mieścil sad.gif

  1. <p>
  2. '.nl2br($ust['index']).'
  3. </p>
  4. </div>
  5. ';
  6. }
  7. $link="news,page,";
  8.  
  9. $zapytanie = "SELECT * FROM news ORDER by id DESC";
  10.  
  11. if(!$strona){
  12. $nr=$_GET["strona"];
  13. if($nr==0)
  14. {
  15. $nr=1;
  16. }
  17.  
  18. $strona=$nr;
  19. }
  20.  
  21.  
  22. $ile=$ust['ilen'];
  23.  
  24. $start=($strona-1)*$ile;
  25.  
  26. $wykonaj = mysql_query($zapytanie) or Die("Nie działa zapytanie". $zapytanie);
  27. $ile_rek = mysql_num_rows($wykonaj);
  28.  
  29. $podstron = ceil($ile_rek/$ile);
  30.  
  31. $zapytanie.= " LIMIT $start,$ile";
  32.  
  33. $final = mysql_query($zapytanie) or Die ("Nie działa zapytanie końcowe");
  34. $i=0;
  35.  
  36. while($row=mysql_fetch_array($final))
  37. {
  38. echo'
  39. <div class="article">
  40. <h2><a href="news,'.$row['id'].','.namen($row['tytul']).'.html">'.$row['tytul'].'</a></h2>
  41. <h3></h3>
  42. <p>
  43.  
  44. </p>
  45. </div>
  46. ';
  47. }
  48. if($ile_rek>$ile)
  49. {
  50. include("podzial.php");
  51. }
  52. }
  53. else if($_GET['action']=="news")
  54. {
  55. $Query='SELECT * FROM news WHERE id="'.mysql_real_escape_string($_GET['id']).'"';
  56. $result = mysql_query($Query) or die(mysql_error());
  57. while ($row = mysql_fetch_array($result))
  58. {
  59. echo'
  60. <div class="article">
  61. <h2><a href="news,'.$row['id'].','.namen($row['tytul']).'.html">'.$row['tytul'].'</a></h2>
  62. <h3></h3>
  63. <p>
  64. '.nl2br($row['tresc']).'
  65. </p>
  66. </div>
  67. ';
  68. }
  69. }
  70. else if($_GET['action']=="ostatnio-szukane")
  71. {
  72. echo'
  73. <div class="article">
  74. <h2>Ostatnio szukane</h2>
  75. <h3></h3>
  76. <p>';
  77.  
  78. $Query='SELECT * FROM search ORDER by datal DESC';
  79. $result = mysql_query($Query) or die(mysql_error());
  80. while($row=mysql_fetch_array($result))
  81. {
  82. echo'<a href="do,'.$row['txt'].'.html">'.mplus($row['txt']).'</a><br>';
  83. }
  84.  
  85. echo' </p>
  86. </div>
  87. ';
  88. }
  89. else if($_GET['action']=="popularne")
  90. {
  91. echo'
  92. <div class="article">
  93. <h2>Popularne</h2>
  94. <h3></h3>
  95. <p>';
  96.  
  97. $Query='SELECT * FROM search ORDER by ile DESC';
  98. $result = mysql_query($Query) or die(mysql_error());
  99. while($row=mysql_fetch_array($result))
  100. {
  101. echo'<a href="do,'.$row['txt'].'.html">'.mplus($row['txt']).'</a><br>';
  102. }
  103.  
  104. echo' </p>
  105. </div>
  106. ';
  107. }
  108.  
  109. ?>
  110.  
  111.  
  112.  
  113.  
  114. </div>
  115. </div>
  116. <div class="right">
  117. <div class="box_top">
  118. <h2><a href="ostatnio-szukane.html">Ostatnio szukane</a></h2>
  119. </div>
  120. <div class="box">
  121. <p><? include("public/ost.php"); ?></p>
  122. </div>
  123.  
  124. <div class="box_bottom"></div>
  125. </div>
  126. <div class="header_bottom"></div>
  127. <div class="footer">
  128. <p><center>Copyright Š 2008 .<a href="http://www.tsi-g.info">TSI-G</a>
  129. </div>
  130. </div>
  131. <? echo $ust['stat'];?>
  132. <!---
  133. TSI-G mp3 Serach 1.0 by piotrek-d1
  134. email: piotrek-d1@o2.pl
  135. www.tsi-g.info
  136. --->
  137. </body>
  138. </html>


Z góry dziękuję za pomoc i Pozdrawiam[/code]
erix
A CSS? Co do layoutu, to spróbuj tego: http://www.alistapart.com/articles/holygrail
danuta47
Oto i plik CSS , jeszcze mam prośbę jak zmienić całe te szare tło na około np na czarny lub inny .

Kod
body { padding: 0; margin: 0; font: 0.7em Arial, sans-serif; line-height: 1.5em; background: #F0F0F0; color: #454545; }
a { color: #0E4D8B; background: inherit; }
a:hover { color: #000; background: inherit;}
a.title { color: #B41A1A; background: #FFF; }

h1 { font: bold 2em Arial, Sans-Serif; letter-spacing: -1px; padding: 16px 0 0 8px; margin: 0; }
h2 { margin: 0; padding: 0; font: normal 1.6em Arial, Sans-Serif; letter-spacing: -1px; }
h1 a { color: #FFF; background: inherit; }
h1 a, h2 a { text-decoration: none; }
h1 a:hover, h2 a:hover { color: #BFE1ED; background: inherit; }
h3 { font: 90% Arial, Sans-Serif; margin: 0 0 10px 0; padding: 0; color: #5f5f5f; background: #FFF; }
p {    margin: 0 0 0px 0; line-height: 1.5em; }
form { margin: 0; }
input.search { width: 199px; border: none; background: #FFF url(input.gif); padding: 4px; color: #808080; }
input.submit { height: 24px; font-weight: bold; width: 53px; border: none; background: #D96855 url(button.gif); padding: 3px; color: #FFF; }

/* layout
   ------ */

.content {
    margin: 10px auto;
    width: 768px;
    background: #FFF url(big_middle.gif) repeat-y;
    color: #454545;
    
}

.logo {    padding: 18px 0 0 3px; }

/* header */
.header_top { background: #FEFEFE url(big_top.gif) no-repeat; color: #FFF; height: 15px; }
.header { padding: 0px 10px 0 10px; }
.header_bottom { clear: both; background: #FEFEFE url(big_bottom.gif) no-repeat; color: #FFF; height: 15px; }
    
/* navigation */
#nav { width:100%; float:left; }
#nav ul { margin:0; list-style:none; padding: 0; }
#nav a, #nav strong, #nav span { float:left; display:block; color:#fff; padding: 7px 20px 4px 10px; background: #C43219 url(nav.gif) no-repeat 100% 0px; text-decoration:none; font-weight: bold; }
#nav a { float:none; }
#nav li { float:left; color: #FFF; background: #C43219 url(nav.gif) no-repeat 0px 0px; margin:0; padding:0 0 0 9px; }
#nav #current { background: #1995C2 url(nav.gif) no-repeat 0 -41px; color: #FFF; }
#nav #current a { background: #1995C2 url(nav.gif) no-repeat 100% -41px; padding:7px 20px 4px 11px; color:#FFF; }
#nav a:hover { color:#BFE1ED; background: #C43219 url(nav.gif) no-repeat 100% 0px; }  


.sf_left {
    float: left;
    width: 203px;
    height: 77px;
    background: #5BB2D1 url(logobg.gif) repeat-x;
    color: #FFF;
    border-top: 1px solid #137DA2;
    border-bottom: 1px solid #000;
    padding: 10px 0 0px 7px;
}

.sf_right {
    width: 537px;
    float: right;
}

.sf_search {
    clear: both;
    background: #CA090D url(searchbg.gif) repeat-x bottom left;
    color: #FFE4E0;
    border-top: 1px solid #AA1717;
    border-bottom: 1px solid #000;
    padding: 18px 0 17px 15px;
    margin-top: -2px;
}
    
.subheader {
    padding: 8px;
    background: #f0f0f0;
    color: #808080;
}

/* left side
   --------- */

.left {
    float: left;
    width: 595px;
    margin: 0 0 10px 0;
}

    .box_top {
        background: #F0F0F0 url(leftbox_top.gif) no-repeat;
        color: #808080;
        height: 40px;
        width: 159px;
    }
    
    .box_top h2 {
        color: #808080;
        background: inherit;
        padding: 7px 0 0 5px;
        margin: 0;
    }
    
    .box {
        border-left: 2px solid #F0F0F0;
        border-right: 2px solid #F0F0F0;
        padding: 0 4px 0 7px;
        margin: 0;
        width: 144px;
        color: #595959;
        background: #FFF;
    }
    
    .box_bottom {
        background: #FFF url(leftbox_bottom.gif) no-repeat;
        color: #000;
        height: 13px;
        width: 160px;
        margin: 0 0 7px 0;
    }
    
        /* left and central column */
        .left_side { float: left; width: 159px; padding: 0px 5px 8px 8px; }
        .right_side { float: right; width: 405px; margin: 0 5px 0 0; }
        
        .article { padding: 0 5px 0 0px; margin-bottom: 20px; }
        
    .grey_top { clear: both; width: 382px; background: #EDEDED url(grey_top.gif) no-repeat; color: #000; height: 5px; padding: 0; margin: 0px 0 0 6px; }
    .grey { width: 362px; margin: 0 0 0 6px; padding: 10px; background: #EDEDED url(grey_bottom.gif) no-repeat bottom left; color: #808080;    }
        
    .grey a {
        color: #C83C3C;
        background: inherit;
        font-weight: bold;
    }
    
    .grey a:hover {
        color: #000;
        background: #EDEDED;
    }
    
    .highlight {
        padding: 5px 3px 5px 3px;
        margin: 0 0 3px 0;
        border-bottom: 1px solid #ccc;
    }
    
        
/* right side
   ---------- */
        
.right { float: right; width: 170px; margin: 0 0 10px 0;}
        
img { float: left; margin: 0 9px 3px 0; }

/* footer
   ------ */

.footer {
    clear: both;
    text-align: center;
    color: #808080;
    background: #f0f0f0;
    padding: 10px 0 5px 0;
    border-top: 1px solid #eee;
}
.footer p {    line-height: 2em; }
.footer a {    color: #4F4F4F; background: #f0f0f0; border-bottom: 1px dotted #808080; text-decoration: none; }
qdesigner
Szary kolor u Ciebie to zapewne #F0F0F0. Pozmieniaj go na czrny podmieniając kod z #F0F0F0 na #000000.

Zmieniaj tylko w miejscach "background: #F0F0F0 ...;" na "background: #000000 ....;"

Zmieniaj po kolei i sprawdzaj.
W taki sposób się nauczysz w jaki sposób w dowolnym miejscu zmienić kolor.
danuta47
Dziekuję bardzo za pomoc smile.gif Prosiła bym jeszcze o pomoc w dodaniu tych 2 boxów na banery . Dziękuję i Pozdrawiam danuta47
erix
Podałem Ci linka do rozwiązania.

Wybacz, ale Ty na tym będziesz najprawdopodobniej zarabiać, my nie, więc to uszanuj.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.