Home >Web Front-end >HTML Tutorial >All heroes, please help me! How to make text and images 10px away from the lower gray border?_html/css_WEB-ITnose
684271ed9684bde649abda8831d4d35584033ca97ae82723f40286aee9b31702Academic Affairs Notice39528cedfa926ea0c01e69ef5b2ea9b0
External CSS:
#sidebar h3 {
padding: 0px 0px 0px 5px;
height:27px;
line-height:40px;
color: #393939;
font-size: 12px; ;
}
#sidebar h3 img{
vertical-align:middle
}
I want the academic affairs notice and this small speaker image to be 10px away from the gray border at the bottom and adjust the padding. The top parameter cannot achieve the effect
Please help me!
#sidebar h3{
margin:0px
}
It may also be The padding and margin of #sidebar affect
In this small menu, margin and padding will have default values, and its parent tag also exists. Even the outermost layer may affect it
You can try line-height. This is used to set the upper and lower positions of text in DIV.
Yes. The person above is right, lz only gave these. You can try margin: 0px; padding: 0px;
In this small menu, margin and padding will have default values, and its parent tag also exists. Even the outermost layer may affect it
Okay, I will post its parent
html, body, div, span, applet, object, iframe, h1, h2, h3, h4,img, ol, ul,p{ margin: 0; padding: 0; border: 0; font-size: 100%; background: transpa}
Yeah. The person above is right, lz only gave these. You can try margin: 0px; padding: 0px;
In this small menu, margin and padding will have default values, and its parent tag also exists. Even the outermost layer may affect it
Okay, I will post its parent
html, body, div, span, applet, object, iframe, h1, h2, h3, h4,img, ol, ul,p{ margin: 0; padding: 0; border: 0; font-size: 100%; background: transpa}LZ can try to adjust the line-height
Adjust the value of line-height.