473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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

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
3 8557


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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: josh dismukes | last post by:
/// here is the code i'm getting a parse error on the last line of the code which /// is </html> any help will be much appreciated. <?php session_start ();
2
by: Porthos | last post by:
Hi All, I'm building an XSL document that puts two types of information in a table dimension: preformatted data and data extracted from my XML document (see below) <table> <tr>
0
by: Matt Adams | last post by:
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...
4
by: Michael Liu | last post by:
I have these styles: p, pre, table { margin: 1em; } And this HTML: <p>A paragraph</p> <table><tr><td>A table</td></tr></table> <pre>A preformatted block</pre> <p>A paragraph</p>
5
by: spectre | last post by:
Hi, I need to copy/paste texts form word, notepad... to an html textarea to store it into a database. With the <pre>tag, and a text with long lines, the text displayed in the textarea needs...
18
by: John | last post by:
I'm getting ready to revamp my Magic Squares pages, which currently show the magic squares in this form: +---+---+---+---+---+---+---+---+---+---+---+ | 68| 81| 94|107|120| 1 | 14| 27| 40| 53|...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
1
by: munnaj | last post by:
hai all, Help me with a style code for firefox. Below is the code which is working fine in IE. But does not work well in firefox. I have also tried with another class for firefox that too not...
1
by: ehcy | last post by:
hello guys.. how can i display the <DIR> in my opened files from my text file with table?.. htmlspecialchars is useless.. it always "Warning: file_get_contents() expects parameter 1 to be string,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.