Mis-aligned text

User 7596 Photo


Registered User
22 posts

Hi everyone,

Any idea why when I bold or italicize something, that text mis-aligns with the rest of the sentence? It's even worse when I bold+italicize together.

See attached or go to http://social-style.com and other pages on this website, and see for yourself.

rob
Attachments:
User 122279 Photo


Senior Advisor
14,624 posts

Try removing 'a,' from the top of your style sheet:

html, body, div, span,
applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dd, dl, dt, li, ol, ul,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 1948478 Photo


Senior Advisor
1,850 posts

Inger wrote:
Try removing 'a,' from the top of your style sheet:...

You would then probably have to remove the 'em' and 'strong' as well.

OR, set 'line-height: 1.5em' under "Element Styles" for 'a', 'em' and 'strong', as it already is for 'p'.

OR, maybe try changing 'vertical-align: middle;' to 'vertical-align: baseline;'
User 1948478 Photo


Senior Advisor
1,850 posts

Robert,

I ran a few tests and found that the best alternative probably would be this:

Change 'vertical-align: middle;' to 'vertical-align: baseline;' in the style sheet (about 25 lines down from the top).

This worked consistently for the cases I tried: links, bold and italics.
User 122279 Photo


Senior Advisor
14,624 posts

Hmmm, when I looked at that css file because of some other trouble a couple of days ago, the vertical-align WAS set to baseline. I didn't even think of checking that again... :rolleyes:
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 1948478 Photo


Senior Advisor
1,850 posts

Inger wrote:
Hmmm, when I looked at that css file because of some other trouble a couple of days ago, the vertical-align WAS set to baseline. I didn't even think of checking that again... :rolleyes:

Yes, that would make sense since the original Meyer resets uses vertical-align: baseline...
User 122279 Photo


Senior Advisor
14,624 posts

I don't like those resets anyway. If you use them, you have to watch your site building as a hawk in order not to build a mess. Not to mention if you have to pick apart someone else's code in an attempt of finding some funnies...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 1948478 Photo


Senior Advisor
1,850 posts

Inger wrote:
...you have to watch your site building as a hawk in order not to build a mess...

You have to do that anyway - with or without resets - don't you? ;)
I have found the resets quite helpful, since they eliminate some of the differences in default values between browsers...
User 7596 Photo


Registered User
22 posts

Thanks Per and Inger, that solved the problem!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.