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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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



    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
    New Coder
    Join Date
    Sep 2012
    Location
    Ohio, United States
    Posts
    14
    Thanks
    3
    Thanked 1 Time in 1 Post
    Whenever css or normal align="Center" doesn't work. I just use <center></center> tags. Works for me every time. Try it out and tell me what you get.

  • #3
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    You need to reduce the font-size on each of them (I'd recommend reducing them to 3em)




    Quote Originally Posted by Nickriggi View Post
    Whenever css or normal align="Center" doesn't work. I just use <center></center> tags.
    The <center></center> tags are deprecated, so is align=""


  •  

    Posting Permissions

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