DevelopPHP
home Forum gear home

Libraries book

HTML Library CSS Library JavaScript Library PHP Library

Videosbook

PHP and MySQL JavaScript HTML and CSS Vector and 3D Flash Actionscript Android Dev Miscellaneous

Resourcesbook

Website Hosting
CSS vertical-align example   Share / Like

The CSS vertical-align property is used to specify the vertical positioning of inline child elements in relation to the height and line-height their parent element.

CSS CODE EXAMPLE
<style type="text/css">
#div1 span { vertical-align: sub; }
#div2 span { vertical-align: super; }
#div3 span { vertical-align: 25%; }
#div4 span { vertical-align: 25px; }
.divClass { line-height:2em; background: #C1E0FF; border:#09F 1px solid; height:50px; }
</style>
<div id="div1" class="divClass">
  WE <span>LOVE</span> CSS
</div>
<hr />
<div id="div2" class="divClass">
  WE <span>LOVE</span> CSS
</div>
<hr />
<div id="div3" class="divClass">
  WE <span>LOVE</span> CSS
</div>
<hr />
<div id="div4" class="divClass">
  WE <span>LOVE</span> CSS
</div>
 
WE LOVE CSS

WE LOVE CSS

WE LOVE CSS

WE LOVE CSS

Possible Values:

pixel amount •• percentage •• auto •• baseline •• sub •• super
top •• bottom •• text-top •• text-bottom •• central •• middle

 

Home   •   Terms of Use   •   Developer Forums   •   T-Shirts   •   RSS   •   Classroom Chalkboard   •   Donate   •   Top ↑
Popular In PHP / MySQL E-Commerce Store Production
Social Network Website Building
Image Upload / Photo Processing
CMS Software Programming
Mass Email Systems
Magic XML Data
Search Programming
Popular In JavaScript JSON Programming
Ajax Programming
Animating Elements
WYSIWYG Programming
Date/Time Programming
DOM Scripting
Object Reference
Popular In HTML Canvas Element
New Form Elements
Audio Element
Video Element
Drag and Drop
Event Handling
Element Grouping
Popular In CSS Custom Font Embedding
Dynamic Fit Backgrounds
Theatre Mode
Box Overlays
CSS Level 1 Properties
CSS Level 2 Properties
CSS Level 3 Properties
©2013 DevelopPHP   |   Navigate to related domains HTML5