Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS] Obrazek i właściwość height
mentoos
post
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 5.09.2009

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


Do loga mam przypisane float: left w divie. Chciałbym, żeby cały div #top był szeroki jak #wrapper, bo jak na razie to div jest szeroki na tyle ile jest obrazek. W tym celu muszę użyć w CSS atrybutu height.
Czy jest poprawne użycie height w takiej sytuacji?

HTML
  1. <!DOCTYPE HTML>
  2. <title>Layout</title>
  3. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  4. <link rel="Stylesheet" type="text/css" href="style.css" />
  5. </head>
  6. <div id="wrapper">
  7. <div id="top">
  8. <a href="#"><img id="logo" src="images/logo.jpg" alt="logo" /></a>
  9. </div>
  10. <div id="photos">Photos</div>
  11. </div>


CSS
Kod
#wrapper {
    margin: auto;
    width: 1004px;
}

#top {
    background-color: #000;
    color: #fff;
    height: 65px;
}

#photos {
    clear: both;
    height: 150px;
}

#logo {
    float: left;
}

img {
    border: none;
}


Ten post edytował mentoos 9.09.2010, 21:45:37
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 - 02:19