2012-02-14 98 views
0

我如何添加一些空间给下面的图像 含义,我想在下面的图像增加空间

<p class="menusomething">In-game Imagery</br> 
<a href="R.jpg"><img src="age1.jpg" width="200" height="150"/>   </a></br> 
<a href="Re2.jpg"><img src="age2.jpg" width="200" height="150"/> </a></BR> 
<a href="Ri.jpg"><img src="Re3.jpg" width="200" height="150"/></a></BR> 
<a href="Ri4.jpg"><img src="e4.jpg" width="200" height="150"/></a></BR> 
</p> 

和CSS代码

p.menusomething{background: white; 
    margin: auto; 
    margin-top: 200px; 
    margin-left: 10px; 
    padding: 10px; 
    width: 200px;} 

回答

1
p.menusomething a img { 
margin: 0 10px 0 0; 
} 
3

你的目标是你的图像容器,而不是图像本身。 来解决这个问题,只需添加下列任何CSS行到文件

p.menusomething a>img 
{ 
    margin-top:20px; /*to have the space above the image*/ 
    margin-bottom:20px; /*to have the space under the image*/ 
} 

只是其中之一应该做的工作,让我知道,如果这是你所需要的。

详细信息请参考此现场演示:http://jsfiddle.net/3jApT/3/

+0

好大,解决它!欣赏它! – Nigel 2012-02-14 16:09:01

+0

林间空地听到,请考虑标记为答案,如果它已经解决了您的问题,谢谢。 – 2012-02-14 16:11:33

0
.menusomething img { 
display:block; 
margin:10px 0 10px 0; 
}