Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Nie chce zeby tekst oblewal fotke! Pomocy
_kama
post 11.10.2006, 13:22:50
Post #1





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

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


Nie mam pomyslu jak to rozwiazac. Potrzebuje xhtmla do takiego screena. Takie newski beda tylko 2 na stronie glownej wiec nie oplaca sie table wstawiac. Efekt ma byc: fotka, pod nia data a obok kazdej fotki tresc ktora nawet jak jest dluzsza to nie oblewa tekstu. Nie bierzcie pod uwage tego tla pomaranczowo - bialego i tej pomaranczowej kreski bo to jest fragment tla:



Moj kod do tej pory:
  1. <div class="news">
  2. <img src="tmp/news1.jpg" alt="" />
  3. <a href="#"><b>Ut wisi enim ad minim veniam</b><br />Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit ...</a>
  4. <span class="data">7 października 2006</span>
  5. </div>
  6.  
  7. <div class="news">
  8. <img src="tmp/news1.jpg" alt="" />
  9. <a href="#"><b>Ut wisi enim ad minim veniam</b><br />Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor ...</a>
  10. <span class="data">7 października 2006</span>
  11. </div>
  12. </div>


a css

  1. #top-left .news {margin: -10px 0 0 0; padding: 0 10px 25px 37px}
  2. #top-left .news img {padding: 3px; border: 1px solid #666666; float:left; margin: 15px 30px 0 0}
  3. #top-left .news span.data {font-size: 11px; color: #333333; margin: 0; padding: 0; clear:both}
  4. #top-left .news a {line-height: 13px; font-size: 11px; color: #E3E3E3; display:block; text-decoration: none; margin: 0; padding: 0}
  5. #top-left .news a:hover {color: #FFFFFF}


ale efekt jest paskudny, poza tym inny w kazdej przegladarce :/ Pomozcie
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
s_w_ir
post 12.10.2006, 08:21:50
Post #2





Grupa: Zarejestrowani
Postów: 315
Pomógł: 1
Dołączył: 6.08.2003
Skąd: Kielce

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


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>Chapter 4: Creative Floating
  5. <style type="text/css" media="screen">
  6. body {
  7. font-family: Arial, sans-serif;
  8. font-size: small;
  9. }
  10. #sweden {
  11. float: left;
  12. width: 304px;
  13. padding: 10px 0;
  14. background: url(img/bg.gif) no-repeat top left;
  15. }
  16. #sweden dl {
  17. float: left;
  18. width: 260px;
  19. margin: 10px 20px;
  20. padding: 0;
  21. display: inline; /* fixes IE/Win double margin bug */
  22. }
  23. #sweden dt {
  24. float: right;
  25. width: 162px;
  26. margin: 0;
  27. padding: 0;
  28. font-size: 130%;
  29. letter-spacing: 1px;
  30. color: #627081;
  31. }
  32. #sweden dd {
  33. margin: 0 0 0 98px;
  34. padding: 0;
  35. font-size: 85%;
  36. line-height: 1.5em;
  37. color: #666;
  38. }
  39. #sweden dl dd.img {
  40. margin: 0;
  41. }
  42. #sweden dd.img img {
  43. float: left;
  44. margin: 0 8px 0 0;
  45. padding: 4px;
  46. border: 1px solid #D9E0E6;
  47. border-bottom-color: #C8CDD2;
  48. border-right-color: #C8CDD2;
  49. background: #fff;
  50. }
  51.  
  52. /* reverse float */
  53.  
  54. #sweden .alt dt {
  55. float: left;
  56. }
  57. #sweden .alt dd {
  58. margin: 0 98px 0 0;
  59. }
  60. #sweden .alt dd.img img {
  61. float: right;
  62. margin: 0 0 0 8px;
  63. }
  64. </head>
  65. <div id="sweden">
  66. <dl>
  67. <dt>Stockholm</dt>
  68. <dd class="img"><img src="img/gamlastan.jpg" width="80" height="80" alt="Gamla Stan" /></dd>
  69. <dd>This was taken in Gamla Stan (Old Town) in a large square of amazing buildings.</dd>
  70. </dl>
  71. <dl class="alt">
  72. <dt>Gamla Uppsala</dt>
  73. <dd class="img"><img src="img/uppsala.jpg" width="80" height="80" alt="Gamla Uppsala" /></dd>
  74. <dd>The first three Swedish kings are buried here, under ancient burial mounds.</dd>
  75. </dl>
  76. <dl>
  77. <dt>Perpetual Sun</dt>
  78. <dd class="img"><img src="img/watch.jpg" width="80" height="80" alt="Wristwatch" /></dd>
  79. <dd>During the summer months, the sun takes forever to go down. This is a good thing.</dd>
  80. </dl>
  81. </div>
  82.  
  83. </body>
  84. </html>


Obczaj, ogólnie chodzi o ustawinie marginesu. Przykład z książki "Kuloodporne strony internetowe" Dan Cederholm.
Go to the top of the page
+Quote Post
_kama
post 12.10.2006, 09:33:22
Post #3





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

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


Super! Wielkie dzieki. O to chodzilo. Juz wszystko dziala slicznie
Go to the top of the page
+Quote Post

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 - 17:04