As you know SPANs are supposed to by default line up on the same line.
So we have 2 SPANs that are not doing this! And we have tried everything for these 2 SPANs to be on the same line and not have a break line, but they keep having a break line and being on 2 lines.
You can see the test page here:
And the 2 SPANs have the ids:
id=“note_lbl”
id=“notes_count”
with innerHTML of:
My Note
I have Posted 3 Notes to date
BTW, we have some Tables in this page, So for those pure CSS guys, please put that aside
and if you can just tell us why in GODs name these 2 SPANs are not aligning up on same line?
Ah so these 2 SPANs are Displaying on 2 different lines because of display: block; in the 2nd SPAN!
Ayayayay
FYI, we have the display: block; is in the 2nd SPAN because at times this display is set to none, so that that SPAN does not display at all. But no problem, we will get around that via Php coding not to display that SPAN at designated times.
Just real blown away that display: block; was behind this multi line display of these SPANs!
Curious: is there a CSS code that will display 2 SPANs in same line even IF one of them has display: block;?
Yes, a fix to get all those spans in the same row, one that does not require any changes in the scripts, only to the “style_new.css” after the ruleblock on line 226:
/* add the below ruleblock */
.lbl_xl{
float: left; /* let following elements flow adjacent */
margin-right: .4em; /* to simulate a space character */
line-height: 22px; /* to level the children */
}
This will work also when the block span is not displayed. Guessing a javascript sets the inline style.
Edit)
You should probably remove the <br> tag after the spans.