Solved

align h1 to bottom of div

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

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

Suggested Solutions

Title # Comments Views Activity
Place text over image using CSS 6 61
styling bootstrap grid system with CSS 2 49
Drop Down not working in mobile- Bootstrap 14 31
Can't get js code to execute 8 31
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

756 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