Total members 11793 |It is currently Sat Aug 24, 2019 5:43 am 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>





Author:
Mastermind
User avatar Posts: 2707
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 Border, CSS Align
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