par
Shinra_Tensei » 22 nov. 2015, 02:47
meri pr ta réponse
bon j'ai essayé mon maximum pour y parvenir à ici, mais toujours pas le resultat ideale

comme vous pouvez le voir y'a un peu d'esapce entre bordure, j'ai essayé avec margin:0 padding:0 mais rien ne se passe
et aussi je veux enlever juste une partie de la bordure, qui est exactement en dessous de l'icone
voila code html
Code : Tout sélectionner
<ul id="menu-demo2">
<li><a><img src="../img/avatar.png"></a>
<ul>
<li><a href="#">lien sous menu 1</a></li>
<li><a href="#">lien sous menu 1</a></li>
</ul>
</li>
</ul>
et voila code css
Code : Tout sélectionner
#menu-demo2, #menu-demo2 ul{
padding:0;
margin:0;
margin-top:4px;
list-style:none;
text-align:center;
position:absolute;
left:96.5%;
width:144px;
}
#menu-demo2 ul{
border-right:1px solid #B0B5B4;
border-left:1px solid #B0B5B4;
}
#menu-demo2 li{
display:inline-block;
position:relative;
border-radius:0px 0px 0 0;
width:80px;
}
#menu-demo2 ul li{
display:inherit;
border-radius:0;
width:144px;
height:45px;
border-bottom:1px solid #B0B5B4;
border-top:1px solid #B0B5B4;
}
#menu-demo2 ul li:hover{
border-radius:0;
}
#menu-demo2 ul li:last-child{
border-radius:0 0 0px 0px;
}
#menu-demo2 ul{
position:absolute;
z-index: 1000;
max-height:0;
left: 0;
right: 0;
overflow:hidden;
-moz-transition: .8s all .3s;
-webkit-transition: .8s all .3s;
transition: .8s all .3s;
}
#menu-demo2 li:hover ul{
max-height:15em;
}
/* background des liens menus */
#menu-demo2 li:first-child{
background-color: #65537A;
}
#menu-demo2 li:nth-child(2){
background-color: #729EBF;
background-image: -webkit-linear-gradient(top, #729EBF 0%, #333A40 100%);
background-image:linear-gradient(to bottom, #729EBF 0%, #333A40 100%);
}
#menu-demo2 li:nth-child(3){
background-color: #F6AD1A;
background-image:-webkit-linear-gradient(top, #F6AD1A 0%, #9F391A 100%);
background-image:linear-gradient(to bottom, #F6AD1A 0%, #9F391A 100%);
}
#menu-demo2 li:last-child{
background-image:-webkit-linear-gradient(top, #CFFF6A 0%, #677F35 100%);
background-image:linear-gradient(to bottom, #CFFF6A 0%, #677F35 100%);
}
/* background des liens sous menus */
#menu-demo2 li:first-child li{
background-color:white;
}
#menu-demo2 li:nth-child(2) li{
background:#333A40;
}
#menu-demo2 li:nth-child(3) li{
background:#9F391A;
}
#menu-demo2 li:last-child li{
background:#677F35;
}
/* background des liens menus et sous menus au survol */
#menu-demo2 li:first-child:hover, #menu-demo2 li:first-child li:hover{
background:#65537A;
}
#menu-demo2 li:nth-child(2):hover, #menu-demo2 li:nth-child(2) li:hover{
background:#729EBF;
}
#menu-demo2 li:nth-child(3):hover, #menu-demo2 li:nth-child(3) li:hover{
background:#F6AD1A;
}
#menu-demo2 li:last-child:hover{
background-color:#273544;
border-top:5px solid #5dade2;
border-left:1px solid #B0B5B4;
border-right:1px solid #B0B5B4;
}
#menu-demo2 li:last-child{
background:none;
border-top:5px solid transparent;
}
#menu-demo2 li:last-child li:hover{
background:#5dade2;
}
#menu-demo2 li:last-child li{
background:#273544;
}
/* les a href */
#menu-demo2 a{
text-decoration:none;
display:block;
padding:8px;
color:black;
font-family:'lato';
}
#menu-demo2 ul a{
padding:8px 0;
position:relative;
bottom:60%;
}
#menu-demo2 li:hover li a{
color:#fff;
text-transform:inherit;
}
#menu-demo2 li:hover a, #menu-demo2 li li:hover a{
color:#000;
}
meri pr ta réponse
bon j'ai essayé mon maximum pour y parvenir à ici, mais toujours pas le resultat ideale
[img]https://s3-eu-west-1.amazonaws.com/sdz-upload/prod/upload/menu63.png[/img]
comme vous pouvez le voir y'a un peu d'esapce entre bordure, j'ai essayé avec margin:0 padding:0 mais rien ne se passe
et aussi je veux enlever juste une partie de la bordure, qui est exactement en dessous de l'icone
voila code html
[code]<ul id="menu-demo2">
<li><a><img src="../img/avatar.png"></a>
<ul>
<li><a href="#">lien sous menu 1</a></li>
<li><a href="#">lien sous menu 1</a></li>
</ul>
</li>
</ul>[/code]
et voila code css
[code]#menu-demo2, #menu-demo2 ul{
padding:0;
margin:0;
margin-top:4px;
list-style:none;
text-align:center;
position:absolute;
left:96.5%;
width:144px;
}
#menu-demo2 ul{
border-right:1px solid #B0B5B4;
border-left:1px solid #B0B5B4;
}
#menu-demo2 li{
display:inline-block;
position:relative;
border-radius:0px 0px 0 0;
width:80px;
}
#menu-demo2 ul li{
display:inherit;
border-radius:0;
width:144px;
height:45px;
border-bottom:1px solid #B0B5B4;
border-top:1px solid #B0B5B4;
}
#menu-demo2 ul li:hover{
border-radius:0;
}
#menu-demo2 ul li:last-child{
border-radius:0 0 0px 0px;
}
#menu-demo2 ul{
position:absolute;
z-index: 1000;
max-height:0;
left: 0;
right: 0;
overflow:hidden;
-moz-transition: .8s all .3s;
-webkit-transition: .8s all .3s;
transition: .8s all .3s;
}
#menu-demo2 li:hover ul{
max-height:15em;
}
/* background des liens menus */
#menu-demo2 li:first-child{
background-color: #65537A;
}
#menu-demo2 li:nth-child(2){
background-color: #729EBF;
background-image: -webkit-linear-gradient(top, #729EBF 0%, #333A40 100%);
background-image:linear-gradient(to bottom, #729EBF 0%, #333A40 100%);
}
#menu-demo2 li:nth-child(3){
background-color: #F6AD1A;
background-image:-webkit-linear-gradient(top, #F6AD1A 0%, #9F391A 100%);
background-image:linear-gradient(to bottom, #F6AD1A 0%, #9F391A 100%);
}
#menu-demo2 li:last-child{
background-image:-webkit-linear-gradient(top, #CFFF6A 0%, #677F35 100%);
background-image:linear-gradient(to bottom, #CFFF6A 0%, #677F35 100%);
}
/* background des liens sous menus */
#menu-demo2 li:first-child li{
background-color:white;
}
#menu-demo2 li:nth-child(2) li{
background:#333A40;
}
#menu-demo2 li:nth-child(3) li{
background:#9F391A;
}
#menu-demo2 li:last-child li{
background:#677F35;
}
/* background des liens menus et sous menus au survol */
#menu-demo2 li:first-child:hover, #menu-demo2 li:first-child li:hover{
background:#65537A;
}
#menu-demo2 li:nth-child(2):hover, #menu-demo2 li:nth-child(2) li:hover{
background:#729EBF;
}
#menu-demo2 li:nth-child(3):hover, #menu-demo2 li:nth-child(3) li:hover{
background:#F6AD1A;
}
#menu-demo2 li:last-child:hover{
background-color:#273544;
border-top:5px solid #5dade2;
border-left:1px solid #B0B5B4;
border-right:1px solid #B0B5B4;
}
#menu-demo2 li:last-child{
background:none;
border-top:5px solid transparent;
}
#menu-demo2 li:last-child li:hover{
background:#5dade2;
}
#menu-demo2 li:last-child li{
background:#273544;
}
/* les a href */
#menu-demo2 a{
text-decoration:none;
display:block;
padding:8px;
color:black;
font-family:'lato';
}
#menu-demo2 ul a{
padding:8px 0;
position:relative;
bottom:60%;
}
#menu-demo2 li:hover li a{
color:#fff;
text-transform:inherit;
}
#menu-demo2 li:hover a, #menu-demo2 li li:hover a{
color:#000;
}[/code]