Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Ustawianie divów
#1
Mam taki problem divy mi się nie chcą ułożyc obok siebie są pod sobą.

index.html
Kod:
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
    <meta name="Description" content="Portal twojego telefonu" />
    <meta name="Keywords" content="Sony Ericsson, tapety ,animacje, tapety, motywy, twoj se, se," />
    <link rel="Stylesheet" type="text/css" href="style.css" />
    <title>Sone Ericsson Dla ciebie | Portal dla twojego telefonu</title>
    <link rel="Shortcut icon" href="images/i.ico" />
</head>
<body link="white" vlink="white" alink="lightblue">
<center>


<div id="gora"><a href="index.html"><img border="0" src="images/logo.PNG" /> </a></div>

<div id="hed">

<div id="menu">
<a href="index.html" style="text-decoration: none">Strona Glowna</a>
<a href="tapety.html" style="text-decoration: none">Tapety</a>
<a href="motywy.html" style="text-decoration: none">Motywy</a>
<a href="gry.html" style="text-decoration: none">Gry</a>
<a href="index.html" style="text-decoration: none">Kontakt</a>
</div>


<div id="news">
<h><font color="#00c6ff" size="6px">Start</font></h><br />
<font size="1" color="#949494">napisal: minor Dnia 09.01.2010r.</font><br />
<font size="2px" color="#a7a7a7">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum <br />
</font>
<div id="w"><font size="2" color="#8d8d8d">[wiecej...]</font></div>
</div>



<div id="news">
<h><font color="#00c6ff" size="6px">Lorem ipsum</font></h><br />
<font size="1" color="#949494">napisal: minor Dnia 09.01.2010r.</font><br />
<font size="2px" color="#a7a7a7">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum <br />
</font>
<div id="w"><font size="2" color="#8d8d8d">[wiecej...]</font></div>
</div>

<div id="tapeta">
<img src="images/tapeta.PNG" /><br />

<font color="#949494">Już niebawem...</font>

</div>


<div id="s">
<font size="2">All right reserved by SonyEricsson4u.pl<br />
Wszelkie prawa do kopiowania sastrzeżone</font>
</div>



</div>
</center>
</body>
</html>


CSS
Kod:
#hed {
width: 713px;

}
#gora {

height: 129px;
background: url(images/tloup.PNG) repeat;

}

#menu {
a { text-decoration: none }
text-decoration: none;
text-align: left;
text-indent: 12px;
line-height: 30px;
width: 713px;
height: 31px;
background: url(images/menu.PNG) repeat;
border-style: 0;
a:link { color: white; }
a:visited { color: white; }
a:hover { color: white; }
a:active { color: white; }
a { text-decoration: none }

}


#h {
font-size: large;
color: #00c6ff;
}

#news {
border-style: 0;
width: 374px;
height: 170px;
text-align: left;
float: ;

}

#w {
text-align: right;
}

#tapeta {
margin-top: 10px;
margin-right: 50px;
width: 234px;
height: 100px;
background-color: #f1f1f1;
text-align: left;
float: ;
}

#s {
color: white;
text-align: left;
width: 712px;
height: 31px;
background: url(images/tlos.PNG);

}

#tabela {
width: 713px;

text-align: left;
float: center;
}

Próbowałem metodą prób i błędów ale dalej nic nie wychodzi. Rozchodzi się o newsy i tapety.

http://i47.tinypic.com/241rvde.png

Dodaje sreena tam gdzie pisze tapety i ponieżej szare tło ma się znaleśc po stronie prawej. A newsy (lorem ipsum ) po stronie lewej.
Odpowiedz
#2
#news {... float: ;} #tapeta {... float: ;} ?
Odpowiedz
#3
Zmień w stylach następujące definicje
#tapeta {
margin-top: 10px;
margin-right: 50px;
width: 234px;
height: 100px;
background-color: #f1f1f1;
text-align: left;
float: right;
}
#news {
border-style: 0;
width: 374px;
height: 170px;
text-align: left;
float: left;
}
Odpowiedz
#4
Zrobiłem tak jak ma programista ale tym razem stopka ( w stylach "s" ) przejechało do góry na gdzie pisze Start i się pokrywają. Gdy usunę float wszystko jest jest pod sobą.

//juz to naprawiłem

w css w stopce dopisałem float: left;

:pp
Odpowiedz


Podobne wątki…
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
Question rozmieszzenie divów r3m4k3 2 2,306 27-02-2012, 16:29
Ostatni post: Ancik
  Jak zrobić dobry układ divów w CSS ? przemek89k 4 4,165 01-09-2011, 00:46
Ostatni post: Dombas
  Problem z ukladem divow Sentinello 6 4,608 04-01-2011, 20:27
Ostatni post: Sentinello
  pozycjonowanie divów mikim160 2 3,506 26-12-2010, 17:36
Ostatni post: mikim160
  Ustawianie obrazków na stronie www jaca691 2 2,730 12-07-2008, 03:54
Ostatni post: Marcin

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości
Sponsorzy i przyjaciele
SeoHost.pl