CSS font stacks & developer FAQs with Web standards

Premium service benefits

Your premium content subscription is a single payment that gives you:

  • Private login to full answers on your chosen subject
  • All future FAQ updates for your topic area
  • Optional email notification of new items
  • Priority attention on follow-up questions
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer, see below for more

A: It would preferable to control your image placement than try to restrict the size of the fonts, which can affect the legibility of your documents. One suggestion is to put the text in a div element with a specific class, and set the bar as a background image. The image need only be a single pixel high, set to repeat vertically. In this example, the image is 20 pixels wide and runs down the left of the div element, the padding-left: 30px; property creates a 10 pixel gap between the right edge of the image and left edge of the text in the div:

… full answer hidden

Click for full answers

Premium members click below for full answer
How do I make the text fit alongside an image bar?

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager