Solved

align h1 to bottom of div

Posted on 2006-11-11
3
561 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
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…

828 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