Hej
Håber der en der kan hjælpe mig med følgende problem:
Min hjemmesider er opbygget i Kompozer, og indeholder bl.a. følgende bokse, der styres med stilark:
En venstre menu (vmenu), en hovedtekstboks (tekst), en højre menu (hmenu) og en bund (bund).
Problemet er, at en af boksene,højremenuen (hmenu), desværre betragter sig selv som en naturlig forlængelse af hovedtekstboksen.
For at placere "hmenu" korrekt, er jeg nødt til at angive en margin-top feks. til -(minus) 1062 pix(els) alt afhængig af mængden af tekst i hovedtekstboksen!
Hvorimod min venstre menuboks (vmenu) fint lader sig placere med en margin top svarende til 0(nul) pix(els), og i øvrigt ikke lader sig påvirke af mængden af tekst i hovedtekstboksen!
Burde hmenu ikke kunne placeres på samme måde. Altså unden at angive top margin?, men blot med float right?
Det er vældigt irriterende, fordi jeg er nødt til at have præcis den samme mængde tekst i hovedtekstboksen på alle siderne, da hmenu flytter sig med mængden af tekst.
Sætter jeg "margin top" for hmenu til nul, sætter menuen sig blot i bunden af hovedtekstmenuen.
Ved nogen hvordan man omgår det problem?
Håber min tekst giver mening?
Sorlar
Og her CSS'en:
* {
margin: 0;
padding: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
body {
min-height: 1000px;
margin-right: auto;
margin-left: auto;
width: 1000px;
background-color: black;
}
.hoved {
width: 1000px;
height: 208px;En venstremenu
background-color: #ffccff;
margin-top: 15px;
margin-bottom: 3px;
}
.logo {
width: 1000px;
height: 50px;
background-color: #ffffcc;
}
.nav {
width: 1000px;
height: 50px;
background-color: black;
font-weight: bold;
text-align: center;
font-family: Arial,Helvetica,sans-serif;
font-size: 15px;
color: white;
}
.vmenu {VF
border-style: none;
border-width: 3px;
padding: 10px;
width: 125px;
min-height: 400px;
float: left;
background-color: black;
color: white;
font-size: 80%;
font-weight: bold;
}
.hmenu {
border-style: ridge;
border-width: 4px;
padding: 10px;
width: 125px;
min-height: 400px;
background-color: #333333;
margin-left: auto;
clear: none;
margin-right: auto;
float: right;
margin-top: -1062px;
}
.tekst {
border-style: ridge;
border-width: 6px;
width: 650px;
background-color: white;
margin-right: 0%;
margin-left: 140px;
padding-right: 20px;
padding-left: 20px;
min-height: 1000px;
opacity: 0.925;
padding-top: 50px;
font-size: 100%;
max-height: 1000px;
min-width: 650px;
max-width: 650px;
display: block;
height: 1000px;
}
.bund {
border-style: solid;
border-width: 2px;
width: 700px;
height: 50px;
margin-right: auto;
margin-left: auto;
}
h1 {
font-family: Arial,Helvetica,sans-serif;
font-size: 100%;
font-weight: bold;
}
.nav ul {
list-style-type: none;
width: 1000px;
}
.nav li a {
text-decoration: none;
color: white;
}
.vmenu a {
text-decoration: none;
color: white;
}
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0
