Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z tłem w div-ach
samuraj_jack
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 13.08.2003

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


Witam mam malutkie pytanko do tego przykładu http://www.tennis.net.pl/css/ czy ktoś może wie jak zrobić aby długość diva po lewej i prawej stronie było uzależnione od diva środkowego z tłem białym. Chodzi mi aby niezależnie od długości tekstu w środkowym(białym divie) tło w sąsiednich divach miało taką sama długość co środkowy div. W zewnętrznych diwach będzie tylko dwie linki tekstu. Dzięki za każdą podpowiedź.
Go to the top of the page
+Quote Post
muniekw
post
Post #2





Grupa: Zarejestrowani
Postów: 243
Pomógł: 22
Dołączył: 1.06.2009
Skąd: Warszawa

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


A może trochę kodu pokażesz?
Go to the top of the page
+Quote Post
viking
post
Post #3





Grupa: Zarejestrowani
Postów: 6 380
Pomógł: 1116
Dołączył: 30.08.2006

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


Zapewne chodzi o oklepany temat http://www.alistapart.com/articles/fauxcolumns/
Go to the top of the page
+Quote Post
samuraj_jack
post
Post #4





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 13.08.2003

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


Dzieki za linka juz go studiuje (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

A OTO KODZIK:

<style type="text/css">
<!--
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
margin: 0px;
padding: 0px;
background-color: #FFCC00;
}
#index {
width:990px;
position:relative;
background-image: url(index.jpg);
background-repeat: repeat;
margin-top: 0;
margin-right: auto;
margin-bottom: 60px;
margin-left: auto;
border: 1px solid #FFFFFF;
}
.q
{
margin: 0px;
padding: 0px;
float: left;
width: 300px;
background-image: url(q.jpg);
background-repeat: repeat;
}
.w
{
margin: 0px;
padding: 0px;
float: left;
width: 300px;
background-image: url(w.jpg);
background-repeat: repeat;
background-position: 0px 0px;
}
.e
{
margin: 0px;
padding: 0px;
background-image: url(e.jpg);
background-repeat: repeat;
}
.r{
margin: 0px;
padding: 0px;
clear: both;
}
-->
</style>
</head>

<body>
<div id="index"><div class="q">jasdjasdasjdkasjda</div><div class="w"> Please choose a site package you would like to test or base your site on.
Plain site
Plain site (ver. 1.1-2)
Stripped install. Contains no special toolbar or menu choices Nie zaimportowane

Dependencies

Nieznany.
Website Interface
Website Interface (ver. 1.4-2)
Website Interface is a web based CMS solution based on eZ Publish. It contains templates and settings that meets the most common requirements for content management systems. Nie zaimportowane

Dependencies

Nieznany.
eZ Flow
eZ Flow (ver. 1.1-2)
The eZ Flow extension to eZ Publish enables editors to build complex page layouts and pre-plan the publication schedule to ensure a constant flow of rich content. Nie zaimportowane

Dependencies

Nieznany. </div><div class="e">fgfgtmn knmihughvgdcrsfx</div><div class="r"></div></div>
</body>
</html>
Go to the top of the page
+Quote Post
muniekw
post
Post #5





Grupa: Zarejestrowani
Postów: 243
Pomógł: 22
Dołączył: 1.06.2009
Skąd: Warszawa

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


Jedno z rozwiązań to ustawić wysokość strony. Tutaj pozmieniałem Twoje css-y.

Kod
body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #000000;
margin: 0px;
padding: 0px;
background-color: #FFCC00;
}

.index {
  width:990px;
  position:relative;
  background-color: rgb(204,102,255);
  background-repeat: repeat;
  margin-top: 0;
  margin-right: auto;
  margin-bottom: 60px;
  margin-left: auto;
  border: 1px solid #FFFFFF;
  height: 60%;
}

.q
{
  margin: 0px;
  padding: 0px;
  float: left;
  width: 300px;
  background-color: rgb(255,51,102);
  background-repeat: repeat;
  height: 60%;
}
.w
{
margin: 0px;
padding: 0px;
float: left;
width: 300px;
background-color: rgb(51,102,153);
background-repeat: repeat;
background-position: 0px 0px;
height: 60%;
}
.e
{
margin: 0px;
padding: 0px;
background-color: rgb(255,0,102);
background-repeat: repeat;
height: 60%;
}
.r{
margin: 0px;
padding: 0px;
clear: both;
}


Nie jest to raczej najlepsze rozwiązanie, ale na razie to mi przychodzi do głowy.

Ten post edytował muniekw 28.07.2009, 09:17:37
Go to the top of the page
+Quote Post

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: 23.08.2025 - 13:20