Line spacing and mixed font sizes

nitins60

New Member
Anyone who knows if it is possible to keep a constant line spacing with CSS, even though you use varying font sizes on a line? Below is an example where the second paragraph has a larger line spacing than the first one. I have tried to set line-height to 0 for the "huge" span in CSS, but it doesn't seem to be enough.\[code\]<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>Line Spacing Test</title><style type="text/css">body { font-size: 14px; line-height: 1;}.huge { font-size: 64px; line-height: 0;}</style></head><body><p>Here is a line using normal font size.<br />Here is another line using normal font size.</p><p>Here is a line with a span with <span class="huge">huge</span> fontsize.<br />Here is another line with a span with <span class="huge">huge</span>font size.</p></body></html>\[/code\]
 
Back
Top