Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS] nakładanie warstw
piotrd
post
Post #1





Grupa: Zarejestrowani
Postów: 174
Pomógł: 0
Dołączył: 16.05.2006
Skąd: Łódź

Ostrzeżenie: (0%)
-----


mam taki oto układ divów
[(1)(2)]

gdzie:
[] = width 960px
(1) i (2) = width 540px każdy

kod
  1. <div id="logo">
  2. <ul>
  3. <li>
  4. text1
  5. </li>
  6. <li>
  7. text2
  8. </li>
  9. </ul>
  10. </div>
  11.  
  12. #logo {width:960px;height:180px}
  13. #logo ul{overflow:hidden;list-style:none;}
  14. #logo li{float:left;width:540px;}


jak zrobić aby (1) i (2) nachodziły na siebie i (1) był nadrzędny dla (2)?

Ten post edytował piotrd 28.08.2011, 13:50:59
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
piotrd
post
Post #2





Grupa: Zarejestrowani
Postów: 174
Pomógł: 0
Dołączył: 16.05.2006
Skąd: Łódź

Ostrzeżenie: (0%)
-----


w dalszym ciągu jednak jest źle, <li id="shuffle"> pojawia sie pod <li> zamiast byc obok na zasadach left:-120px;z-index:-1;
  1. <div id="head2">
  2. <div class="container">
  3. <div class="main">
  4. <div id="logo">
  5. <ul>
  6. <li>
  7. <div id="title"><a href="./index.php" tabindex="1"><i>text</i><span></span><strong><i>text</i></strong></a></div>
  8. <div id="slogan">hasło</div>
  9.  
  10. </li>
  11. <li id="shuffle">
  12. <img src="templates/img/top/4.jpg" class="th" alt="" border="0" /><img src="templates/img/top/12.jpg" class="th" alt="" border="0" /><img src="templates/img/top/3.jpg" class="th" alt="" border="0" /><img src="templates/img/top/11.jpg" class="th" alt="" border="0" /><img src="templates/img/top/5.jpg" class="th" alt="" border="0" /><img src="templates/img/top/1.jpg" class="th" alt="" border="0" /><img src="templates/img/top/6.jpg" class="th" alt="" border="0" /><img src="templates/img/top/2.jpg" class="th" alt="" border="0" /><img src="templates/img/top/7.jpg" class="th" alt="" border="0" /><img src="templates/img/top/9.jpg" class="th" alt="" border="0" /><img src="templates/img/top/10.jpg" class="th" alt="" border="0" /><img src="templates/img/top/8.jpg" class="th" alt="" border="0" />
  13. </li>
  14. </ul>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
Kod
#container{width:100%;margin:0 auto;padding:0;position:relative;}
#head1, #head2, #head3, #body, #foot{float:left;width:100%;margin:0 auto;padding:0;}
.container{width:960px;margin:0 auto;text-align:left;}

#head1 .container .main{float:right;width:100%;margin:0;background:#FEF0C1;}

#head2{clear:both;}
#head2 .container{height:180px;background:#FEF0C1 url('img/tlo.png') no-repeat left bottom;}

#logo{padding:0;margin:0;position:absolute;z-index:1;}
#logo #title{float:left;padding:0px 0px 0px;}
#logo #title a{color:orange;font:bold 5.5em Verdana;text-transform:uppercase;text-decoration:none;}
#logo #title a span{color:orange;}
#logo #title a strong{color:#836b4c;}
#logo #slogan{clear:left;margin-left:80px;margin-top:30px;padding:0px 15px;background:inherit;color:#544d3d;font:italic 15px Verdana;}

#logo ul{overflow:hidden;list-style:none;}
#logo li{float:left;width:540px;}
#logo li#shuffle{position:relative;left:-120px;z-index:-1;}
.th{float:left;margin:0px;}

czy znajdzie ktoś błąd? może zamiast UL i LI stosować DIV?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 7.10.2025 - 10:31