www.webdeveloper.com
Results 1 to 3 of 3

Thread: Fixing No. of text lines in a div

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Location
    India
    Posts
    15

    Angry Fixing No. of text lines in a div

    I am using a simple div displaying 4 lines of text.
    When the browser zoom level was changed the no of lines of text display gets changed. I want to display the content with 4 lines irrespective of the browser zoom level.

    Can anyone help me in making correct style for the div or the text?

  2. #2
    Join Date
    Jan 2011
    Posts
    3
    <pre>
    This is line 1
    This is line 2
    This is line 00000011
    This is lne 0x04
    </pre>

  3. #3
    Join Date
    Nov 2010
    Location
    Los Angeles, CA
    Posts
    234
    have you tried the line-height CSS property? If your div is 100 pixels in height and you want to fit 5 lines you would use a line-height of 20px.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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



Recent Articles