HTML / CSS

Gestart doorOne2xs8 reacties37 weergaven

9 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
ik heb een jQuery dropdown menu pompommet CSS en HTML natuurlijk
nu is het probleem dat de dropdown zich iets lager opent dan hoort redfacedit is de HTML:

<div id = "menu">
                <div id= "menu_items">
                        <ul id="jsddm">
    <li><a href="#" class="link">JavaScript</a>
        <ul>
            <li><a href="#" class="link">Drop Down Menu</a></li>
            <li><a href="#" class="link">jQuery Plugin</a></li>
            <li><a href="#" class="link">Ajax Navigation</a></li>
        </ul>
    </li>
    <li><a href="#" class="link">Effect</a>
        <ul>
            <li><a href="#" class="link">Slide Effect</a></li>
            <li><a href="#" class="link">Fade Effect</a></li>
            <li><a href="#" class="link">Opacity Mode</a></li>
            <li><a href="#" class="link">Drop Shadow</a></li>
            <li><a href="#" class="link">Semitransparent</a></li>
        </ul>
    </li>
    <li><a href="#" class="link">Navigation</a></li>
    <li><a href="#" class="link">HTML/CSS</a></li>
    <li><a href="#" class="link">Help</a></li>
</ul>
                </div>
            </div>


en de css:

/* menu */
#jsddm {
    margin: 0;
}

#jsddm li {
    margin: 0;
    float: left;
    list-style: none;
}

#jsddm li a {
    margin: 0;
    display: block;
    white-space: nowrap;
}
        
#jsddm li ul {
    margin: 0;
    padding: 0;
    position: absolute;
    visibility: hidden;
    border-top: 1px solid white;
}
        
#jsddm li ul li {
    margin: 0;
    float: none;
    display: inline;
}

#jsddm li ul li a {
        margin: 0;
        background-color: #791941;
}


Printscreen:
Afbeelding
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
dit ligt volgens mij niet aan je jsddm maar aan die class die je meegeeft aan de link yummieDie a.link en a.link:hover moet je margin-top:0px meegeven. Door de padding zakt het 5px. En met de margin hef je dit weer op. Tenminste ik denk dat het dan opgelost is wink
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
nog steeds
hierbij de HELE css:

/* CSS Document */
/*  Stylesheet | Author: Marjolein KFB Design 2009 */

/* main */
body {margin: 0px 0 0 0; padding: 0; font-family: Verdana, Tahoma, arial; font-size: 10pt; color: #8d7769; width: 100%; height: 100%;}
html {
    width: 100%; height: 100%;
    scrollbar-base-color: #fffcec;
    scrollbar-arrow-color: #8d7769;
    scrollbar-track-color: #fffcec;
    scrollbar-shadow-color: #fffcec;
    scrollbar-lightshadow-color:#fffcec;
    scrollbar-darkshadow-color: #fffcec;
    scrollbar-highlight-color: #8d7769;
    scrollbar-3dlight-color:#fffcec;
    
background-color: #fffcec;
background-image: url(images/bg_site.png); background-repeat: repeat-x;    
}
#container { width: 1000px; margin: 0 auto;}
#header {width: 1000px; height: 149px; background-image:  url(images/header.png);}
#menu {width: 1000px; height: 33px; background-image:  url(images/menu.png); padding: 0; margin: 0;}
#menu_items { width: 1000px; margin: 0px 0 0 85px;}
#main {width: 1000px; background-image:  url(images/content_bg.png); padding: 0; margin: 0;}
#content_top {width: 1000px; background-image:  url(images/main_top.png); background-repeat: no-repeat; padding: 0; margin: 0;}
#menu_left {width: 200px; margin: 0 0 0 85px; float: left;} 
#content {width: 600px; margin: 0 0 0 15px; float: left;}
#footer {width: 1000px; height: 47px; background-image: url(images/footer.png);}
#bottom {width: 1000px; height: 20px; background-color:#fffcec; text-align: center; font-weight: lighter; padding: 10px 0 0 0;}



/* menu items */
a.link {margin:0px; font-family: Verdana; font-size: 12px; font-weight: bold; height: 30px; width: 131px; color:#fffcec; text-decoration: none;    
                    display: inline-block;  
                    margin-right: 2px; 
                    padding-top: 5px; 
                    text-align: center;    }
a.link:hover {margin:0px;    font-family: Verdana; font-size: 12px; font-weight: bold; width: 131px; height: 30px; color:#791941;    text-decoration: none;    
                    display: inline-block; background-image:  url(images/menu_linkover.png); background-repeat: no-repeat; 
                    margin-right: 2px;
                    padding-top: 5px; 
                    text-align: center;    }

                                        
a {margin:0px; font-family:Verdana; font-size:10pt; color:#705849; text-decoration: none;}
a:hover {margin:0px; font-family:Verdana; font-size:10pt; color:#bca388;}

/* content */

h1 {
font-size: 9pt; font-face: Verdana; font-weight: bold; color: #fffcec; text-decoration: none; text-align: left;
margin: 0; padding: 3px 0 0 5px; background-color: #791941; width: 195px; height: 15px; 
}

h2 {
font-size: 9pt; font-face: Verdana; font-weight: bold; color: #fffcec; text-decoration: none; text-align: left;
margin: 0; padding: 3px 0 0 5px; background-color: #791941; width: 600px; height: 15px;
}

/* menu */
#jsddm {
    margin: 0;
}

#jsddm li {
    margin: 0;
    float: left;
    list-style: none;
}

#jsddm li a {
    margin: 0;
    display: block;
    white-space: nowrap;
}
        
#jsddm li ul {
    margin: 0;
    padding: 0;
    position: absolute;
    visibility: hidden;
    border-top: 1px solid white;
}
        
#jsddm li ul li {
    margin: 0;
    float: none;
    display: inline;
}

#jsddm li ul li a {
        margin: 0;
        background-color: #791941;
}
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik bedoelde in dit stukje:

/* menu items */
a.link {margin:0px; font-family: Verdana; font-size: 12px; font-weight: bold; height: 30px; width: 131px; color:#fffcec; text-decoration: none;    
                    display: inline-block;  
                    margin-right: 2px; 
                    margin-top: 0px;
                    padding-top: 5px; 
                    text-align: center;    }
a.link:hover {margin:0px;    font-family: Verdana; font-size: 12px; font-weight: bold; width: 131px; height: 30px; color:#791941;    text-decoration: none;    
                    display: inline-block; background-image:  url(images/menu_linkover.png); background-repeat: no-repeat; 
                    margin-right: 2px;
                    margin-top: 0px;
                    padding-top: 5px; 
                    text-align: center;    }


Verander eens in bovenstaande dus met margin-top erbij.
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Gedaan werkt nog niet confused
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hmz, jammer.
Maar het is iets met de margin, als ik morgen ff tijd heb zal ik m wel ff testen en van alles proberen waar de fout kan zitten.
0
Berichten
1.168
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb je een voorbeeld online?
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Nee helaas niet
me host is tijdelijk offline
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
BUMB
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren