Total members 11890 |It is currently Sat Apr 20, 2024 1:11 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





vertically and horizontally centering of html element ( Image , tables or any other tags) .
css code
<html>
<head>
<title>centering an image</title>

<style type="text/css">
.divCenter {
display: table-cell;
border:1px solid blue;
text-align: center;
vertical-align: middle;
width: 100px
height: 100px;
}
.divCenter * {
vertical-align: middle;
}
.divCenter {
display: block;

}

</style>

</head>

<body>
<div class="divCenter">
<img src="loader.gif" alt="Loader">
</div>

</body>
</html>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : vertically and horizontally centering of html elements
 get HTML elements attributes values using JQuery     -  
 Can I display same vertically on right side?     -  
 Add elements to the end of an array     -  
 Elements of a Java Program     -  
 elements of a GridBagLayout organized     -  
 clone arrayList elements     -  
 count elements in a vector     -  
 lesson5: XSD Complex elements     -  
 lesson6: XSD Complex Empty Elements     -  
 Add border around ordered list elements     -  



Topic Tags

CSS Align, CSS Border
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com