Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

float some text at the bottom of a div layer.
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

float some text at the bottom of a div layer.

float some text at the bottom of a div layer. 9 months, 3 weeks ago #749

  • dinesh
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
I am facing problem in the floating some text at the bottom of a div layer. How can I do this?
can anyone help me, Here is the code of my html with inline css
CODE:
<html>
<head>
<t-itle>Bottom align text</title>
<s-tyle type="text/css">
.divParent{
height:400px;
background-color: green;
}

.top{
vertical-align: top;
}

.bottom{
vertical-align: bottom;
}

</style>
</head>
<body>
<div class="divParent">
<p class="top">This text is at the top</p>
<p class="bottom">This text is at the bottom</p>
</div>
</body>
</html>
Last Edit: 9 months, 3 weeks ago by dinesh.

Re: float some text at the bottom of a div layer. 9 months, 3 weeks ago #753

  • hrishi
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Change your css by this css codespec
CODE:
<s-tyle type="text/css">
.wrap{
position:relative;
height:400px;
background-color:green;
}
.top{
}
.bottom{
position:absolute;
bottom:0;
margin:0;
}
</style>
  • Page:
  • 1
Time to create page: 1.23 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download