italics, borders, text-align: justify issue

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

I don't ask many questions, but there might be people who know more than me Smiling

This is a bit of a wacky one. I have a page, with a box of text. The text in the box has a padding of 5px on left and right sides. There is a 1px border surrounding the text. The text is aligned as justify (for a cleaner look) and it displays fine, unless I use italics.

As soon as I have italics in the box, the right border disappears. I assumed before I had padding that it was the letters jamming against the side, and causing all sorts of havoc. It appears that I was incorrect, and even with padding the right border still disappears. BUT to make it even more confusing,
if I text-align: left (or I assume right) the border reappears.

One more thing, this only occurs in IE, not in Firefox. Thus, it's an issue with IE, fine, but how do I fix it?

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Tell your users not to use IE Sticking out tongue

Alternatively, you can just use another style. As in, don't use italics.

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

Well I did find a workaround, that is kind of lame. Set italics as display:block and text-align:left; but of course this means that they will have to be on their own line at all times, maybe someone has a slightly more helpful suggestion.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.