Gallery description line height too small
linyangchen
Registered Users Posts: 54 Big grins
I noticed that when my gallery description has multiple lines, the lines are too close to each other such that the descenders of letters on the upper line overlap with the ascenders of letters on the lower line. :huh An example can be seen here if you resize the browser window small enough to squeeze the gallery description into two lines (I have not yet used long descriptions, because of the unsightly line spacing that would result on a normal-sized browser window).
There is no such problem with photo captions.
It could be that SmugMug automatically adds <p> tags to the gallery description - is this actually the case? :scratch I have found that using (my own) <p> tags on my 'About' page causes the same behaviour, and omitting the <p> tags restores proper line spacing.
I have searched around but so far haven't found a way to disable the auto <p> tags (if they exist) in the gallery description. :dunno Does anyone have insights on why this happens and/or suggestions how I could fix this? Thanks for your help.
Yangchen
There is no such problem with photo captions.
It could be that SmugMug automatically adds <p> tags to the gallery description - is this actually the case? :scratch I have found that using (my own) <p> tags on my 'About' page causes the same behaviour, and omitting the <p> tags restores proper line spacing.
I have searched around but so far haven't found a way to disable the auto <p> tags (if they exist) in the gallery description. :dunno Does anyone have insights on why this happens and/or suggestions how I could fix this? Thanks for your help.
Yangchen
where Photons meet Black Holes
www.linyangchen.com
www.linyangchen.com
0
Comments
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
You are quite correct that the gallery descriptions are inside p tags. You can see them by using the developer tools in Firefox or Chrome to look at the html and css sent to your browser. Moreover, your design uses 21px fonts for the gallery descriptions and SmugMug, rather bizarrely, has hard-coded line-height:20px for the p tag in their core CSS. I don't think you can get rid of the p tags, but Denise's fix to redefine the properties for the class containing the gallery description will, of course, override the SmugMug setting. I've my own collection of local patches to deal with the same bug and am contemplating the global approach by inserting
p {line-height:125%;}
into my CSS. Does seems awfully strange to have to patch something for so basic a tag.
Great frog, by the way.
Jim Ringland
jtringl.smugmug.com
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
Thank you very much for the fixes, I don't know why I didn't figure them out myself, but I hope others will find this thread useful. :ivar In my case I just changed the line height globally, since I have no p tags anywhere else to worry about.
Perhaps the next step is to brace ourselves for when (if) SmugMug removes the hardcoding, causing the counterhardcoded 125% line height to be too large.
Glad you liked the frog, it is always a wonderful feeling to be so close to nature.
Yangchen
www.linyangchen.com