SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Jan 2005
    Location
    blahblahblah
    Posts
    1,447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What's the best way to make a given text take 100% of a box?

    Hello,

    Instead of having the title of my website displayed through an image, I'd like to use a web-font. I just need to make sure the text is going to have a specific width, because the design esthetic relies a lot on that.

    Is it a good approach? Should I keep my image?

    Regards,

    -jj.

  2. #2
    SitePoint Enthusiast PiontekMedia's Avatar
    Join Date
    May 2011
    Location
    Vermont
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would just keep the image if you need the text to be spaced out a certain way, otherwise you may run into problems with different screen resolutions.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by jjshell View Post
    Hello,

    Instead of having the title of my website displayed through an image, I'd like to use a web-font. I just need to make sure the text is going to have a specific width, because the design esthetic relies a lot on that.

    Is it a good approach? Should I keep my image?

    Regards,

    -jj.

    I'm not quite sure what you are asking exactly but you can't really set a width on text and just expect it to fit. You can increase the font size and letter and word spacing and make it wider as required but there is not complete control over it.

    If you want to keep your image you could use a gilder/levin image replacement technique and get some text in the html for accessibility.


Bookmarks

Posting Permissions

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