Solved

align h1 to bottom of div

Posted on 2006-11-11
3
563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

734 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