HTML image center

how do i show an image always come center?
one html page has one image always come center.
and if i need to show text over image, how do i do it?
Hiroyuki TamuraField EngineerAsked:
Who is Participating?
 
erikTsomikSystem Architect, CF programmer Commented:
there number of may to do this.

<center><img src=""></center>

or
<div align="center"><img src=""></div>
0
 
Hiroyuki TamuraField EngineerAuthor Commented:
thank you.
if i want to make any blank space between the corner of the window, what should i do?
0
 
erikTsomikSystem Architect, CF programmer Commented:
just add CSS. add id to the div
<style type="text/css">
#newLine{margin:10px;padding:10px;}

</style>

<div id="newLine" align="center"><img src=""></div>
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Hiroyuki TamuraField EngineerAuthor Commented:
thank you.
if i have a link on the page, how do i make it?
should i do text over image and make link or use div to make a link over image?
i want to try text over image but i don't know how.
noname.jpg
0
 
erikTsomikSystem Architect, CF programmer Commented:
for example you have this
<div class="image">
  <img alt="" src="http://www.kavoir.com/img/text-over-image.jpg" />
  <div class="text">
    <p>test1.</p>
    <p>text2</p>
  </div>
</div>

Then you just add css to the <head> and it should work
.image {
      position:relative;
      float:left; /* optional */
}
.image .text {
      position:absolute;
      top:10px; /* in conjunction with left property, decides the text position */
      left:10px;
      width:300px; /* optional, though better have one */
}
0
 
Hiroyuki TamuraField EngineerAuthor Commented:
thank you.
http://datapro.homeip.net/usone/
do you know how to align the image vertically center?
0
 
Hiroyuki TamuraField EngineerAuthor Commented:
thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.