New Posts
Live Radio
Welcome guest, is this your first visit?
  • Login:
Professional Web Design - Landing Pages - Banners
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Feb 2009
    Location
    United States
    Posts
    300
    Feedback Score
    9 (100%)

    Default CSS Help - Lining up text on a button

    I'm trying to have a button on my review pages with a text link centered over the button. The following works for the most part.

    p.playslotnow {
    font-family:arial;
    font-size:20px;
    font-weight:bold;
    padding-left:35px;
    }

    .playslots {
    background-image:url('/images/red-button-large.png');
    background-repeat:no-repeat;
    float:right;
    padding:15px;
    width: 344px;
    height: 49px;
    }

    The problem I'm having is that each game has a different title and the text moves more left or right depending on how short or long the text is.

    How can I have the text centered over the button no matter what?

  2. #2
    Writer-Photoshop Newbie
    My Status
     

    Add as a friend
    Join Date
    Feb 2009
    Location
    Vancouver, Wa
    Posts
    639
    Blog Entries
    1
    Feedback Score
    21 (100%)

    Default

    Quote Originally Posted by CasinoKev View Post
    I'm trying to have a button on my review pages with a text link centered over the button. The following works for the most part.

    p.playslotnow {
    font-family:arial;
    font-size:20px;
    font-weight:bold;
    text-align:center;
    line-height:enter a number in pixels here..might have to play with it to get it just right;
    padding-left:35px; <---- take this out if you're only using one line of text like "play now" or "download" ..use the line-height instead}

    .playslots {
    background-image:url('/images/red-button-large.png');
    background-repeat:no-repeat;
    float:right;
    padding:15px;
    width: 344px;
    height: 49px;
    }

    The problem I'm having is that each game has a different title and the text moves more left or right depending on how short or long the text is.

    How can I have the text centered over the button no matter what?
    In bold ^^^^^

    I would do the line height vs the padding myself as long as you're not putting other text in there besides maybe 'play now' or whatever.

    (I'm still rather new with coding myself, so someone else may want to chime in and confirm what I did)

  3. #3
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Feb 2009
    Location
    United States
    Posts
    300
    Feedback Score
    9 (100%)

    Default

    Thanks for giving it a shot Matt! Actually, that's the problem - each page has different text. For example, one page has "Download Game" and another may have "Download Really Long Game".

    The text-align:center didn't work, but I'm sure we're on the right track.

  4. #4
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    448
    Feedback Score
    6 (100%)

    Default

    CSS

    .playslots {
    background-image:url('/images/red-button-large.png');
    background-repeat:no-repeat;
    float:right;
    width: 344px;
    height: 49px;
    text-align:center;
    }
    .playslots a {
    font-family:arial;
    font-size:20px;
    font-weight:bold;
    line-height:49px;
    }

    HTML

    <div class="playslots"><a href="#">Download Game</a></div>
    Gambling Revolutions

    Are you in need of nice looking poker chips? or maybe something else
    Gambling Products Recreation

    Swedish poker site with poker bonus and reviews.

  5. #5
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Feb 2009
    Location
    United States
    Posts
    300
    Feedback Score
    9 (100%)

    Default

    Beautiful! Thanks sirtiner!

  6. #6
    Writer-Photoshop Newbie
    My Status
     

    Add as a friend
    Join Date
    Feb 2009
    Location
    Vancouver, Wa
    Posts
    639
    Blog Entries
    1
    Feedback Score
    21 (100%)

    Default

    Quote Originally Posted by sirtiner View Post
    CSS

    .playslots {
    background-image:url('/images/red-button-large.png');
    background-repeat:no-repeat;
    float:right;
    width: 344px;
    height: 49px;
    text-align:center;
    }
    .playslots a {
    font-family:arial;
    font-size:20px;
    font-weight:bold;
    line-height:49px;
    }

    HTML

    <div class="playslots"><a href="#">Download Game</a></div>
    Showoff

    I think I was close, wasn't I?

  7. #7
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    448
    Feedback Score
    6 (100%)

    Default

    Quote Originally Posted by Matt Geer View Post
    Showoff

    I think I was close, wasn't I?
    haha, yeah you were close
    Gambling Revolutions

    Are you in need of nice looking poker chips? or maybe something else
    Gambling Products Recreation

    Swedish poker site with poker bonus and reviews.


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. WTB: Text Ads
    By Hazo in forum Advertising
    Replies: 1
    Last Post: 04-06-2010, 04:31 AM
  2. Check/Fold Button - Friend or Foe? - 504 words
    By PokerFelts in forum Content Services
    Replies: 2
    Last Post: 03-29-2010, 03:34 PM
  3. Save the red button - LOL
    By CK in forum PAL Coffee Shop
    Replies: 11
    Last Post: 02-13-2010, 06:22 PM
  4. Play Now Button vs Banner
    By doovde in forum General Poker Affiliate Forum
    Replies: 6
    Last Post: 03-08-2009, 02:18 PM
  5. Thanks button like PAP added
    By pokerprop in forum PAL Suggestions - Questions - Feedback
    Replies: 18
    Last Post: 11-19-2008, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.5
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0
Affiliate Program Consultant