webForumDet fria alternativet

Placera bild längst ner (enkel CSS)

2 svar · 447 visningar · startad av Peeer

PeeerMedlem sedan mars 20025 907 inlägg
#1
[b]style.css[/b]
body {background-color: #003D79; text-align:center;}
.block {background-color: #EEE; width: 715px; height: 95%; margin:auto; text-align:left }
.top { background: url(images/topbanner.gif) top no-repeat; width: 715px; height: 111px;}
.middle { background: url(images/middle.gif) left repeat-y; width: 715px; height: 100%;}
.bottom { background: url(images/bottom.gif) bottom no-repeat; width: 715px; height: 30px;}

[b]Default.asp[/b]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css">
<title>Untitled</title>
</head>
<body>
<div class="block">
  <div class="middle">
    <div class="top"></div>Hej
    <div class="bottom"></div>
  </div>
</div>
</body>
</html>

Det jag vill åstadkomma är att bilden bottom.gif lägger sig längst ner i 'block'et. Men den lägger sig precis under top.gif-bilden. Tips?

PallemanMedlem sedan dec. 2000557 inlägg
#2

Lägg <div class="bottom"></div> utanför middle-div´en.

<div class="block">
    <div class="middle">
        <div class="top"></div>
         Hej
    </div>
    <div class="bottom"></div>
</div>
PeeerMedlem sedan mars 20025 907 inlägg
#3

Tackar & bockar!

123 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
120 ms — hämta tråd, inlägg och bilagor (db)