View Full Version : Align to bottom of div?
AmenKa
11-26-2008, 11:45 PM
How would I go about aligning a span tag to the bottom right of a div without absolutes? For instance...
<html>
<head>
<style>
.container {
height: 150px;
margin-left: 5em;
margin-right: 5em;
}
.mySpan {
vertical-align: bottom;
float: right;
}
</style>
</head>
<body>
<div class="container">
<span class="mySpan">Text | Text | Text</span>
</div>
</html>
Code that actually works though...
Snookerman
11-27-2008, 10:37 PM
I have a feeling this is not what you want but it does the job:
.mySpan {
margin-top:130px;
height:20px;
float: right;
}
AmenKa
11-28-2008, 10:08 PM
You would be correct, I dont want to use margins to shove the text down a specific number of pixels, I want it to be at the bottom useing points as the size instead of pixels...
Magic_343
12-03-2008, 11:44 AM
Hi,:)
U can try this i think this will work for you.
magic
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
margin:0;
padding:0;
}
#content {
width:150px;
height:300px;
margin:0;
padding:0;
left:0;
top:0;
position:absolute;
display:block;
border:1px #000000 solid;
}
#content p{
bottom:0px;
right:0px;
margin:0px;
padding:0px;
position:absolute;
}
</style>
</head>
<body>
<div id="content">
<p>Link1 | Link2 | Link3</p>
</div>
</body>
</html>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.