开发者

css image placement

I have a full width container (100%) and i like to have a image inside NOT A BACKGROUND for clicking purpose...

How can i center the image into the container horizontally ?

here is a sample : http://notrepanorama.com/test/


Solution :

.centerimage {
    margin-left: -960px;
    width: 1920px;
    left: 50%;
    position: absolute;
}

Since i have found the solution to my problem, i will give the checked (√) to the one the will tell me why the spacing before the blue box, it's should be adjacent to the p开发者_如何转开发hoto


.container img {
display: block;
margin: 0 auto;

}


<div style="text-align: center;">
  <a href="/">
    <img src="image.png" />
  </a>
</div>


.container {
text-align: center;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜