Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help vertically aligning in DIV

    Hey can anyone help me? So I have this DIV inside of a DIV and I want the content in the second DIV to align vertically. Here's an example of the html:

    <div id="header-index">
    <div id="header-description">
    <img src="images/logo-index.png" alt="Chris Tarampi | Designer">
    <h2 class="header-1">Hi there, I’m Chris Tarampi</h3>
    <p class="header-2">and I’m a creative, visual, and interactive designer. </p>
    </div><!-- End of "header-description" -->
    </div><!-- End of "header-index" -->

    The CSS for the DIVS are:
    #header-index{
    width: 100%;
    position: relative;
    height: 519px;
    background-image:url(images/header-index.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position:center;
    }

    #header-description {
    width: 760px;
    margin: auto;
    display:block;
    text-align: center;
    padding-top:60px;
    }

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 594 Times in 593 Posts
    What do you mean by text align vertically?

    text-align: left; in #header-description { CSS
    or text-align:right;
    or text-align:justify;

    instead of text-align: center;
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •