How can I prevent shaking when I mouse over list items on here? I have tried different margins and paddings up until now. I have also checked which css element overflows but I couldn’t find any result.
my css is here:
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
background:#000000;
color:#fff;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
.temizle{clear:both;}
#containerANA{
width:1100px;
height:auto;
margin: 0 auto;
font:10px arial, helvetica, Geneva, sans-serif;
}
#content{
width:100%;
margin-top:0px;
}
#content p{
position: relative;
margin-left:auto;
margin-right:auto;
top:0px;
display: block;
padding: 5px;
color: #769B4E;
font-size:18px;
font-family: arial, helvetica, Geneva, sans-serif;
text-align:justify;
border: 0px solid #769B4E;
margin-top: 10px;
margin-bottom: 10px;
}
#content p a{
color:#ccc;
text-decoration:none;
}
#content p a:hover{
background:#e5da5f;
color:#000;
}
.ikinciSol{
width:550px;
height:auto;
float:left;
margin-right:0px;
font-family:Verdana, Geneva, sans-serif;
text-align:left;
}
.ikinciSol h1{
font-weight:bold;
text-decoration:none;
font-size:14px;
font-family:Verdana, Geneva, sans-serif;
color:#fb891a;
}
.ikinciSol ul
{
list-style-type: none;
}
.ikinciSol #playlist li {
margin-left:50px;
}
.ikinciSol ul li .singer{
font-size:18px;
display:inline;
}
.ikinciSol ul li .song{
font-size:14px;
display:inline;
}
.ikinciSol ul li a{
text-decoration:none;
color:#fff;
margin-right:5px;
}
.ikinciSol ul li .singer a:hover{
background:#e5da5f;
color:#000;
}
.ikinciSol ul li .song a:hover{
background:#FF9966;
color:#000;
}
.artist_track{
margin-right:12px;
}
.fav{
}
.ilgiliOge{
width:402px;
height:306px;
font-size:24px;
padding:0px;
}
The problem is that when you hover your mouse, the height of the
<li>changes due to the share buttons. To prevent this from happening, you should give amin-heightto the list-item. On top of that, if you want to keep the text centered in relation to your buttons, you should also give it aline-heightand some more tweaking.CSS Code:
JSFiddle link: http://jsfiddle.net/vZnFF/
PS: You shouldn’t add breaks between list items.
PS2: You could do the same :hover efect with just CSS.