#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Posts
    12
    Rep Power
    0

    Position text center in div


    Hi everyone

    I need help with moving my text in the middle of the div box.

    heres my website www.psdflyers.net

    if you look under the banner the text is not completely visible i would like for it to be moved to the middle so that it looks like this


    the code i put is below

    Code:
    <div style="float: left; width: 270px; height: 63px; margin-top: -10px; background: none repeat scroll 0%10% #000000; color: #ffffff; font-family: 'Bebas Neue',Arial,Helvetica,sans-serif; font-size: 5em; padding: -20px 0 0px; text-indent: 0px; text-align: center;">LATEST</div>
    <div style="float: left; margin-left: 15px; height: 63px; margin-top: -10px; width: 450px; background: none repeat scroll 0% 0% #b30404; color: #ffffff; font-family: 'Bebas Neue',Arial,Helvetica,sans-serif; font-size: 5em; padding: -5px -5px -5px; text-indent: 20px; text-align: center;">PSD MOST WANTED</div>
    <div style="float: left; width: 210px; margin-left: 15px; height: 63px; margin-top: -10px; background: none no-repeat scroll 0% 0% #00aaff; color: #ffffff; font-family: 'Bebas Neue',Arial,Helvetica,sans-serif; font-size: 5em; padding: -5px -5px -5px; text-indent: 20px; text-align: center;">GUEST!</div>
    <div style="clear: both;"> </div>
    <p><em class="box"> </em></p>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    get rid of the "text-indent" property and reduce the "font-size" from 5em to 3em.

    Also, for your EASTERNIGHT text, drop its font-size down to 2em to get it to be inside its div.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Location
    Troy, NY
    Posts
    46
    Rep Power
    68
    Code:
    text-align: center


    I strongly recommend also that you do not use inline styling

IMN logo majestic logo threadwatch logo seochat tools logo