Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2014
    Posts
    383
    Thanks
    65
    Thanked 0 Times in 0 Posts

    Question about line-height attribute

    Hello

    I have some text (Review1, Review2) which has been 'cut off' along the top (please see screenshot) and thought that by adding a line-height attribute to my CSS style-sheet that that may rectify the problem; unfortunately it hasn't.

    Reviews 1-4 here: Hungry Panda Chinese restaurant are governed by these attributes:

    Code:
    #box4 
    {	
    width: 235px;	
    overflow: hidden;	
    float: left;
    line-height:-2em; <---------- added}
    
    #box4 h3
    {
    border-bottom: dashed 1px #C9C9C9;	
    }
    
    #box5 
    {	
    width: 235px;	
    overflow: hidden;	
    margin: 0 0 0 270px;
    }
    
    #box5 h3
    {	
    border-bottom: dashed 1px #C9C9C9;
    }
    Which value should I be changing, please?

    Thank you.
    Attached Thumbnails Attached Thumbnails -line_height_question-jpg  

  2. #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    9,684
    Thanks
    6
    Thanked 1,145 Times in 1,116 Posts
    There is no negative value for line height. Also, apply the line height to the headline, not the whole box.
    A line height of 1 (without unit, just the number) applied directly to the h3 appeared to work for me. Or, if you really insist on a line height applied to the box then 2.3 did it for me.

    Also, I suggest you read this fantastic article about web typography, especially points 4–6 and the conclusions, because there is more to good looking websites than fancy fonts and graphics.

  3. Users who have thanked VIPStephan for this post:

    Blue1 (04-27-2014)

  4. #3
    Regular Coder
    Join Date
    Feb 2014
    Posts
    383
    Thanks
    65
    Thanked 0 Times in 0 Posts
    Hello VIPStephan

    That's great, thank you.

    You've also helped me resolve a couple of similar problems on neighbouring pages, so thank you again.

    I have bookmarked the link you kindly sent me. I didn't realise Georgia was so popular and Times Roman so unpopular! Yes, I don't normally use those cursive, decorative fonts because their tails, etc, often overlap with other things (or underlap in my case).

    Blue1


 

Posting Permissions

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