Solved

align h1 to bottom of div

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

914 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