By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

How to move <PRE> definition inside <TD> ...< /TD> to a stylesheet ?

P: n/a
I want to move the following <PRE> defintion to a css file:

<TABLE><TR><TD><PRE>sample text</PRE></TD>
<TD> not predefined font</TD></TR></TABLE>

should be

<TABLE><TR><TD class=aaa>sample text</TD>
<TD> not predefined font</TD></TR></TABLE>

with

mycss.css containing

TD.aaa { ...... ???? ........... }

Matt

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a


Matt Adams wrote:
I want to move the following <PRE> defintion to a css file:

<TABLE><TR><TD><PRE>sample text</PRE></TD>
<TD> not predefined font</TD></TR></TABLE>

should be

<TABLE><TR><TD class=aaa>sample text</TD>
<TD> not predefined font</TD></TR></TABLE>

with

mycss.css containing

TD.aaa { ...... ???? ........... }


td.aaa { white-space: pre; }
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

P: n/a
Martin Honnen <ma*******@yahoo.de> wrote:
td.aaa { white-space: pre; }


And

td.aaa { font-family: monospace; }

perhaps with some specific fixed-width fonts listed first. The pre
element in HTML preserves white space but it also implies the need for
monospace font, and in CSS, these features are separate.

On the other hand, if it is essential that a table cell be presented
the same way as pre elements, then is it really a CSS affair to say
that? Maybe pre markup is better. Maybe a different approach is needed,
depending on _why_ pre would be used.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3

P: n/a
Matt Adams <Ma********@email.com> wrote:
I want to move the following <PRE> defintion to a css file: Are you trying to get monospaced text (like Courier)? If so, see below.
TD.aaa { ...... ???? ........... }


td.aaa { font-family: monospace; }
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.