CSS

Her kan du stille og svare på spørgsmål omkring CSS
Besvar
Crow
Rutineret
Rutineret
Indlæg:64
Tilmeldt:15. apr 2014, 11:24
CSS

Indlæg af Crow » 5. maj 2014, 12:26

i have tried multiple time's to find the reason to why when i downscale a window that my drop-down menu point's wont stay on their line but instead where they get pushed down, this is my current css, i hope that someone can help me figure out how i can make the menu point's scale in size while staying on the top line:

* {margin:0; padding:0; outline:0}
body {font:11px Verdana,Arial; color:#000; background:#000}
.nav {height:36px; background:#aaa; color:#fff; text-shadow:1px 1px #888; z-index:1000; top: 0%; width: 100%; position: fixed;}
.menu a {float:left; color:#eee; text-decoration:none; width:120px; height:28px; padding-top:8px}
.menu span {float:left; color:#eee; text-decoration:none; width:120px; height:28px; padding-top:8px}
.menu a:hover {color:#fff}
.menu {list-style:none; font:16px Arial,Verdana; text-align:center; width:50%; margin:0 auto}
.menu li {position:relative; float:left; width:120px; z-index:1000}
.menu ul {display:none; position:absolute; font:normal 13px Arial,Verdana; top:36px; left:0; background:#aaa; display:none; list-style:none}
.menu ul li {float:none; border-top:1px solid #ccc; width:120px}
.menu ul li a, li.menuhover li a, li.menuhover li.menuhover li a {float:none; display:block; background:none; height:22px; padding-top:5px}
.menu ul li a:hover, li.menuhover li a:hover, li.menuhover li.menuhover li a:hover {background:#999; color:#fff}
.menu ul li span, li.menuhover li span, li.menuhover li.menuhover li span {float:none; display:block; background:none; height:22px; padding-top:5px}
.menu ul ul {left:120px; top:0}
.menu li.submenu {font-weight:bold}
.menu li.noborder {border-top:none}
.menu li.nodiv { } /* missing */
li.menuhover a, li.menuhover li.menuhover a {color:#fff; background:#999}
li.menuhover span, li.menuhover li.menuhover span {color:#fff; background:#999}
#info {width:180px; background:#eee}
#info li {width:160px; border-top:none; padding:8px 10px; color:#666; text-shadow:1px 1px #fff; text-align:left}


/*
* needed or not ?
* maybe contain ping status check etc. ?
*/
#menubar
{
font: 11px Verdana,Arial;
color:#000;
top: 5%;
left: 0.5%;
right: 87%;
bottom: 5%;
position: fixed;
background-color:#fff;
border-style: solid;
border-width: thin;
border-color:black;
}

/*
* TODO: make content white and 5% below navigationbar and above the footer at all times while scrolling
*/
#content
{
font: 11px Verdana,Arial;
color:#000;
top: 5%;
left: 15%;
right: 15%;
bottom: -95%;
position:absolute;
background-color:#fff;
border-style: solid;
border-width: thin;
border-color:black;
}

footer {
font:11px Verdana,Arial;
text-shadow:1px 1px #888;
color:#000;
width: 100%;
height: 36px;
background-color: #aaa;
position:fixed;
left: 0px;
top: 96.2%;
}

Crow
Rutineret
Rutineret
Indlæg:64
Tilmeldt:15. apr 2014, 11:24

Re: CSS

Indlæg af Crow » 5. maj 2014, 12:32

jeg håber at nogen kan hjælpe mig med dette problem da jeg ikke selv kan finde fejlen og hænger lidt fast på dette punkt.

Brugeravatar
scootergrisen
Moderator
Moderator
Indlæg:709
Tilmeldt:21. jun 2012, 23:40
Kontakt:

Re: CSS

Indlæg af scootergrisen » 5. maj 2014, 17:29

Bedre og lave en side så vi kan teste det selv.
Du kan gøre det på http://jsfiddle.net/

Brugeravatar
ThomasI
Grundlægger
Grundlægger
Indlæg:1528
Tilmeldt:28. dec 2010, 10:49

Re: CSS

Indlæg af ThomasI » 5. maj 2014, 19:28

HVorfor skriver du både på engelsk og dansk ? :?

Brugeravatar
ThomasI
Grundlægger
Grundlægger
Indlæg:1528
Tilmeldt:28. dec 2010, 10:49

Re: CSS

Indlæg af ThomasI » 5. maj 2014, 19:28

Og ja, smid det en fiddle - så har vi noget at arbejde med :-P

Besvar