综合技术

How do I center an image in my browser?

微信扫一扫,分享到朋友圈

How do I center an image in my browser?
0

UPDATED.

I want to center an image in a webpage both horizontally and vertically
. I tried using the following JQuery and I can’t figure out what I’m doing wrong.

The webpage is here: http://aaa.sr

This is the JQuery I’m using: andreaslagerkvist.com/jquery/center/

I’ve put the js file here: aaa.sr/jquery.center.js

I’m new here so this website allows me to post only one link in my question. Any help is appreciated. Thanks!

Something as simple as this would do the trick. I decided to leave my answer (The others are correct) not only to show a solution to your current problem, but also to suggest scrapping the paragraph tag (It isn’t necessary) and to suggest adding an alt description to your image tag.

This css:

#container {text-align: center;}

And this html:


Should be all you need for a website this simple.

阅读原文...

Hello, buddy!

基于Python实现excel表格读写

上一篇

The AngularJS toaster displays an alert twice instead of once on the file loading

下一篇

您也可能喜欢

评论已经被关闭。

插入图片
How do I center an image in my browser?

长按储存图像,分享给朋友