Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML] Rozciągnięcie diva poza pojemnik
wujek2009
post
Post #1





Grupa: Zarejestrowani
Postów: 350
Pomógł: 31
Dołączył: 23.05.2010

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


Hej,

Wewnątrz #container posiadam diva #baner, który chciałbym rozciągnąć wg. 100% szerokości EKRANU - ale sam #container ma już nałożony width w postaci 980px
- da się obejść tej pojemnik, ale NIE przenosząc kodu poza #container

  1. #container { width: 980px; margin: 0 auto; }
  2. #baner { width: 100%; height: 90px; background: #ff0000; }


  1. <div id="container">
  2. <div id="baner">
  3. BANER
  4. </div>
  5. </div>
Go to the top of the page
+Quote Post
tenloginjestzaje...
post
Post #2





Grupa: Zarejestrowani
Postów: 358
Pomógł: 1
Dołączył: 20.07.2014

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


  1. #baner { width: 100%; height: 90px; background: #ff0000; min-width:1000px;}
Go to the top of the page
+Quote Post
Pyton_000
post
Post #3





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


http://jsfiddle.net/pLtvdg0j/
Go to the top of the page
+Quote Post
wujek2009
post
Post #4





Grupa: Zarejestrowani
Postów: 350
Pomógł: 31
Dołączył: 23.05.2010

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


@Pyton_000

Sposób z position absolute jest dobry (+ parametr left), sam o tym myślałem - tylko nie wiem/nie pamiętam jak zrobić, aby był margines dolny. Ponieważ po ustawieniu tych parametrów, cały content co znajdował się pod #baner uciekł pod zawartość diva z banerami.
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: 16.09.2025 - 14:17