Some of the mass times have a comment below the mass time. When the comment is to long to fit on one line, it wraps as expected but there is too much space between the lines. I have tried reducing the line height to 0px but that does not help. I then thought that it could be some kind of padding or margin but the code explorer in FF does not show any padding or margin.
Can someone explain to me how to get the wrapped text to be closer together?
Hi, the url you posted has a typo: the page file is spelled “/mass_times.asp”
Try give the comment span style a display:inline-block; rule. (I suggest 1 as a lowest readable line-height)
The span is an inline element resident on a text line and can’t change the line-height. With inline-block display it will act as a block and a block element has the capability to format its content.
Hi @RCDAwebmaster, To my post I’d like to add a suggestion for the space adjustment above the comment.
I also suggest that you take advantage of that the inline-block itself sits on a text line and has the capability as inline to take a vertical-align rule.
So try also give the comment spans a vertical-align:top; rule. That will give all comments an equal space above, regardless the eventual linebreaks in the comments, and make the relative positioning unnecessary.
I tried using a div and setting it to inline-block and was able to adjust the spacing which is great. Now I have another issue. Sometimes the comment text is butted up against the time while in other places it’s got a separating space. It seems that single lines are a few pixels (3) away while wrapping lines are touching. Could this be that I told the div to position:relative? I ended up setting top:-2 which is a distance I could live with. I really wanted to use -6 for the word “Lent”, but other comments appeared underneath the time. I also added a margin of 8px to the bottom to push time below the comment down. See Lent on Tuesday at St. Mary’s Church, Ballston spa.
I noticed that space difference and already posted a solution for it in my last post above:[quote=“Erik_J, post:6, topic:255682”]
I also suggest that you take advantage of that the inline-block itself sits on a text line and has the capability as inline to take a vertical-align rule.
So try also give the comment spans a vertical-align:top; rule. That will give all comments an equal space above, regardless the eventual linebreaks in the comments, and make the relative positioning unnecessary.
[/quote]
If you look at the posted code you’ll see that I also removed the positioning. If you want more space above, apply e.g. a margin-top:.3em;. The vertical-align:top; rule will still make them evenly spaced below the time text.
I did not know that inline-block would allow me to vertically align the test to top. Thanks for the assistance. Now all the comments are equidistant from the time.