Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> divy obok siebie i ich automatyczna szerokość
asrob
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 20.01.2010

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


Witam.

Mam (upraszczając) 2 divy obok siebie
1 (main) - szerokość 550px
2 (zdjecia) - szerokość 155 px
Chciałbym zrobić tak że jeżeli div2 nie ma żadnej zawartości to jego szerokość=0 i wtedy div1 jest na całą szerokość - jak to zrobić? troche kombinowałem ale póki co udaje mi się jedynie to "zepsuć" wstydnis.gif

kod u mnie wygląda tak:

Kod
<div id="content">
            <div id="sidebar">
              <jdoc:include type="modules" name="left" style="xhtml" />
             </div>
         <div id="kolumny">
              <div id="main">
              <jdoc:include type="component" style="xhtml" />
              </div>
              <div id="zdjecia">
              <jdoc:include type="modules" name="right" style="xhtml" />
              </div>
          </div>
<div/>



Kod
#content {
clear: both;
width: 980px;
overflow: auto;
background: white url(../images/menu-prawe-tlo.jpg) repeat-y;
}

#sidebar {
float: left;
min-width: 183px;
text-align: left;
}
#kolumny {
float: right;
width: 797px;
background: white url(../images/srodek-kamien.jpg) no-repeat;
}

#main {
float: left;
width: 550px;
padding: 0 10px 0 45px;
min-height: 500px;
height:auto !important;
height:500px;

}

#zdjecia {
float: right;
width: 155px;
padding: 0 10px 0 10px;
min-height: 500px;
height:auto !important;
height:500px;
}
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 Aktualny czas: 21.08.2025 - 16:10