Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS][HTML]pozycjonowanie div
Johnas
post 15.02.2012, 15:35:27
Post #1





Grupa: Zarejestrowani
Postów: 650
Pomógł: 16
Dołączył: 5.07.2010
Skąd: Ściśle Tajne

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


Witam mam problem. otóż nie mogę wy pozycjonować dwóch divów.

Mój css wygląda tak:
  1. /* Getting the new tags to behave */
  2. article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video {display:block;}
  3. mark, rp, rt, ruby, summary, time {display:inline;}
  4.  
  5.  
  6.  
  7. body {
  8. font-family:Arial, Helvetica, sans-serif;
  9. font-size:100%;
  10. color:#fff;
  11. background:url(../images/bg.png) center 0 no-repeat #000;
  12. width:800px;
  13. font-size:0.75em;
  14. line-height:1.5em;
  15. }
  16. .logo {
  17. width:300px;
  18. position:absolute;
  19. margin-right: 0 auto;
  20. top:280px;
  21. }
  22. .box_home {
  23. background: url('../images/ramka.png') no-repeat center top;
  24. width: 230px;
  25. height: 140px;
  26. float: left;
  27. padding: 15px 15px 15px 15px;
  28. margin: 0 3px 0 3px !important;
  29. margin: 0 2px 0 2px;
  30. border: none;
  31. }
  32.  
  33. .box_home a{
  34. position: relative;
  35. display: block;
  36. z-index: 100;
  37. border: 0px;
  38. }
  39.  
  40. .box_home img{
  41. border: none;
  42. }
  43.  
  44. .tree_frame {
  45. width:800px;
  46. height: 100px;
  47. position:absolute;
  48. top:300px;
  49. }
  50.  
  51. .lewo {
  52. float:left;
  53. }
  54.  
  55. .prawo {
  56. float:right;
  57. }
  58.  
  59. .center {
  60. margin-right: auto;
  61. margin-left: auto;
  62. }


kod HTML tak:
  1. <title>dbomb</title>
  2. <meta charset="utf-8">
  3. <link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
  4. </head>
  5. <img src="images/lg.png" border="0" class="logo"/>
  6. <div style="tree_frame">
  7. <div class="box_home">
  8. <a href="/klubGaleria.html" title="Kalendarz Imprez"> <img src="images/ki1.png" onmouseover="src='images/ki2.png'" onmouseout="src='images/ki1.png'" alt="Kalendarz Imprez" /> </a>
  9. </div>
  10. <div class="box_home">
  11. <a href="http://www.forum.clubara.pl" title="Forum"> <img src="images/box_wedrowka.jpg" alt="Forum" /> </a>
  12. </div>
  13. <div class="box_home">
  14. <a href="/__wedrowka.html" title="Wędrówka po salach klubu"> <img src="images/box_wedrowka.jpg" alt="Wedrowka po Clubie" /> </a>
  15. </div>
  16. </div>
  17. </body>
  18. </html>


a wygląda wszystko tak:


Co chce? Chcę aby klasa "tree_frame" była na środku i na wysokości 300 pikseli od góry "top:300px;" a klasa logo była na środku. Niestety wszystkie sposoby jakie robie nie działają jak by coś blokowało.


--------------------
Jak coś jest dobre, to nie znaczy że nie może być to lepsze - Ideały nie istnieją ;D
Strony internetowe Świnoujście
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 20:42