<td style="font-family: Verdana, Arial, Helvetica,
sans-serif;font-size:8pt;text-align:justify; border:1px solid
#0f4fc5;background-color:#ffffff;padding:3px">
...all pretty standard stuff really.
Now if by entering some text into the cell, the text happens to wrap within
the middle of an emphasised section (using the <em> tag) the right border
disappears! Strange, but true.
Questions:
1) Am I breaking some DHTML/CSS rules maybe?
2) Is this a problem with IE?
Any insights would be greatly appreciated.
Incidentally, two workarounds:
1) Ensure text doesn't wrap within emphasised text
2) Wrap each word of the emphasised text in its own <em> tag (tedious!)
Try closing the em tag.
<em> this a </em> test.
Hope that works
Kiran Math
</tr>
--------- End code -------
Hope that helps
Kiran Math
Is this 'problem' a problem of ms's rendering engine or my code?
Is it (for example) illegal (in CSS terms) to justify text in a cell with
right borders set at 1 pixel and emphasised text?
Thanks anyway.
Martin
"Kiran Math" <kira...@hotmail.com> schrieb im Newsbeitrag
news:#ZkRfoj6...@TK2MSFTNGP11.phx.gbl...
Try this code .....
----- start of code -----
<table border=1 width= 100>
<tr>
<td style="font-family: Verdana, Arial, Helvetica,
sans-serif;font-size:8pt;text-align:justify; border:1px solid
#0f4fc5;background-color:#ffffff;padding:3px">
<div style="width=92">
asdf asd <em>fasd asdf asd
fasd fasd asd asd </em>asdf asdfasdfa asd asdf asdfasdfasdfasdf asdf asd
fasdf asd <em>fasd asdf asd
fasd fasd asd asd </em>asdf asdf asdf asd fasdf asd <em>fasd asdf asd
fasd fasd asd asd </em>asdf asdf asdf asd fasdf asd <em>fasd asdf asd
fasd fasd asd asd </em>asdf asdf asdf asd f
</div>
</td>
</tr></table>
- --------- end of code ---------------------------------
I have used the width of the div tag as 92 ( padding + border width).
I hope this works for your case.
Kiran Math
But why do I need to wrap the text in a fixed width <div> tag? I guess this
is a workaround for a MS problem. Is this correct?
Martin
"Kiran Math" <kira...@hotmail.com> schrieb im Newsbeitrag
news:eHbvM3l6...@TK2MSFTNGP11.phx.gbl...
in your example, you are only getting the right border as one of your lines
of data is increasing the width of the cell to over 92 pixels. Cut this line
in half and the right border disappears! Any other ideas?
Martin
"Kiran Math" <kira...@hotmail.com> schrieb im Newsbeitrag
news:eHbvM3l6...@TK2MSFTNGP11.phx.gbl...
"Martin Gosling" <martin_do...@thegoslinggroup.com> wrote...
> Kiran, no, sorry, it doesn't work!
>
> in your example, you are only getting the right border as one of your
lines
> of data is increasing the width of the cell to over 92 pixels. Cut this
line
> in half and the right border disappears! Any other ideas?
>
>
> "Kiran Math" <kira...@hotmail.com> schrieb...
Well Martin, you cannot increase the size of the div tag more than 92 as,
You have got the padding of 3 and border is 1 px thick.
So 3 *2 + 2 *1 = 8 px.
So the width of div would be 100 - 8 = 92 px.
So any tag inside the <td> tag of width 100 px should be max 92 px. Any
thing beyond this will push the contents out of the max <td> width of 100.
I hope that makes it clear.
Thank you
Kiran Math
--------- start code ----
<table border=0 width=100>
<tr>
<td style="font-family: Verdana, Arial, Helvetica,
sans-serif;font-size:8pt;text-align:justify;
background-color:#ffffff; margin-left: 0; margin-right: 0;">
<div style="width:100;border:1px solid #0f4fc5;padding:3px">
<em>fasd asdf </em>sdf asd <em>fasd asdf asd fasd fasd asd
asd </em>assdfas
</div>
</td>
</tr>
</table>
-------- end code --------------
Hope that helps.
Kiran Math
So it seems to be a problem with MS, it only working if one applies the
style to a DIV tag within the TD tag.
Interesting.
Thanks once again.
Martin
"Kiran Math" <kira...@hotmail.com> schrieb im Newsbeitrag
news:e#gHWaJ7C...@TK2MSFTNGP12.phx.gbl...