Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-07-2012, 11:28 PM   PM User | #1
jace1319
New to the CF scene

 
Join Date: Sep 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
jace1319 is an unknown quantity at this point
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>
jace1319 is offline   Reply With Quote
Old 09-08-2012, 12:03 AM   PM User | #2
Nickriggi
New Coder

 
Join Date: Sep 2012
Location: Ohio, United States
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Nickriggi is an unknown quantity at this point
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.
Nickriggi is offline   Reply With Quote
Old 09-08-2012, 12:11 AM   PM User | #3
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
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=""
Sammy12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:56 AM.


Advertisement
Log in to turn off these ads.