Solved

align h1 to bottom of div

Posted on 2006-11-11
3
558 Views
Last Modified: 2006-11-18
i have a div with class called title.  it contains a h1 tag.  i want this tag to align to the bottom of the div please.

<div id="main">
      <div class="title">
                <h1>Welcome to my website.</h1>
        </div>
      <img src="" alt=""/>
      <p>Some text here</p>
      <p class="footer"><a href="/sitemap/" title="Sitemap">Sitemap</a></p>
</div>

my code:

#main div.title
{
      height:243px;
      padding:0px;
      margin:0px;
      width:500px;
      background:#FFFFFF;
}

#main div.title h1
{
      position:absolute;
           bottom:0px;
           left:0px;
      padding:0px;
      margin:0px;
      font-size:1.8em;
      font-weight:normal;
      color:#888888;
      font-family: "Trebuchet MS", helvetica, arial, sans-serif;
}
0
Comment
Question by:ellandrd
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Steggs earned 500 total points
ID: 17921834
Greetings ellandrd,

Just add position:relative; to #main div.title

Regards
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17921852
genius!
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17921854
Thanks Mark!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now