- This topic is empty.
-
AuthorPosts
-
April 1, 2013 at 12:20 pm #43824
pepe_lepew
ParticipantHello;
I am trying to test some line heights and for some reason, it is not working. I even went to the extreme of setting to 1px and it is not working. I have included a link with the css insiude the html for easier reading and any help would greatly be appreciated.
April 1, 2013 at 12:57 pm #130330Paulie_D
MemberPerhaps you could define what the ‘problems’ are.
April 1, 2013 at 12:59 pm #130332pepe_lepew
ParticipantOk, from what I understand, line height is the distance from the top of 1 line to the top of the next line. With a line height of 1px, the text should practically be overwriting itself. Or ???
April 1, 2013 at 1:07 pm #130334Paulie_D
MemberThe line height can’t affect the actual height of the text…just the space around it….usually.
Again, my question is…what is the problem?
April 1, 2013 at 1:23 pm #130337pepe_lepew
ParticipantThe problem is I need to drink more to understand this. Is this true … 2 lines of text, same 16px, with a line height of 1px would practically overwrite themselves?
As for my problem … I want the “XXX” part to be large, say H1 size, with the “TITLE” smaller, say h3, but tucked underneath with very little line space between them. I could make an image and add it to the page if my explanation sux.
April 1, 2013 at 3:07 pm #130345pepe_lepew
ParticipantOkay, that makes sense … I needed more text to show it was working properly. I guess the problem is more the distance between paragraphs in this case. I have a temp fix that I can at least play with. THANK YOU !!!
April 1, 2013 at 9:45 pm #130368chrisburton
ParticipantKeep in mind, creating a fixed line-height of 1.5x the font-size won’t always look appropriate. It is more visual than set with calculation.
> Edit: you could accomplish what you’re after by using a negative bottom margin on the h1 tag.
Or set a smaller line-height to the h1.
April 1, 2013 at 10:24 pm #130371chrisburton
ParticipantIt depends on how the font renders, honestly. I couldn’t exactly say with your example unless I have a visual reference.
Plus, some people use 1.4x the font-size, some use 1.8x. It all depends visually. And I’m not a firm believer when it comes to baseline grids on the web.
April 2, 2013 at 11:22 am #130410chrisburton
ParticipantWhich you can, in return, use a positive margin to bring it back down. Doesn’t negative margins cause inconsistencies in some browsers?
April 2, 2013 at 12:54 pm #130429chrisburton
ParticipantTake a look at the “Bugfixes” section. That’s what I was referring to. However, I wasn’t aware of the fix so using a negative margin would ultimately work. So I would agree with your solution.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.