Hi,
I want to use CSS to define the font size in every cell of a table. This
avoids needing to define the font size in every <TD> tag using the normal
multiple HTML <FONT SIZE="2"> notation. Therefore my question is, Is there a
CSS attribute I can set on the <TD> tag that will set the size of any text
within the table cell?.
Regards,
Dave 2 96849
Dave Moore wrote: Hi, I want to use CSS to define the font size in every cell of a table. This avoids needing to define the font size in every <TD> tag using the normal multiple HTML <FONT SIZE="2"> notation. Therefore my question is, Is there a CSS attribute I can set on the <TD> tag that will set the size of any text within the table cell?.
td{font-size:100%;}
If you want this to be applied only to certain table cells, you add
class="certain"
to each <td>, and
td.certain{font-size:100%;}
in the CSS.
If for instance you want all <td>s in certain rows to take the effect,
you add the class to the <tr> instead of to the <td>, and use this in
the CSS:
tr.certain td{font-size:100%;}
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
On Wed, 01 Jun 2005 12:55:45 +0200, Dave Moore
<da**********@b aesystems.com> wrote: Hi, I want to use CSS to define the font size in every cell of a table. This avoids needing to define the font size in every <TD> tag using the normal multiple HTML <FONT SIZE="2"> notation.
Excellent idea. Some people will respond that you shouldn't use different
font sizes at all, but that is a different subject.
Therefore my question is, Is there a CSS attribute I can set on the <TD> tag that will set the size of any text within the table cell?.
No need for that. CSS selectors can refer directly to elements. Example:
td {font-size: small;}
If you want to limit styles to a certain table, you can add a class
attribute to the table:
<table class="tablenam e"><tr><td>exam ple</td></tr></table>
and refer to that:
table.tablename td {font-size: small;}
Any basic CS guide will help you with this. For example: http://www.htmlhelp.com/reference/css/
--
Get Opera 8 now! Speed, Security and Simplicity. http://my.opera.com/Rijk/affiliate/
Rijk van Geijtenbeek This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mel |
last post by:
is it possible ?
i tried size=100% and 'NADA !'
thanks,
Mel
|
by: Stan Brown |
last post by:
In looking over my style sheet
http://www.acad.sunytccc.edu/instruct/sbrown/screen.css
I see that I have identical fonts and colors set on table and td
elements.
Is there any reason to do this, or is it a bit of cargo-cultery that
I put in there when I was first starting out?
As far as I can see, if I've styled td and th there's no need to
style table, as far as font and color go. (Other properties like
|
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 text</TD>
<TD> not predefined font</TD></TR></TABLE>
|
by: Radek |
last post by:
How can I get the following to appear on just 1 line?
<style type="text/css">
#center { text-align: center;}
#left { text-align: left;}
#right {text-align: right}
</style>
<table border=1 width=200>
<tr>
|
by: js |
last post by:
I have a table rendered with XSLT. The first column has a radio
button controls for user to make a selection for a particular row.
All the values in the remaining columns are all concated with a  
(blank). I need to retieve the text in each cell of that row if the
radio button on that row is clicked. Each <TD> has a numeric ID so
that I can use it with document.getElementById().innerText method. I
use Javascript to assign some...
| |
by: Pete Kipe |
last post by:
I'm not a JavaScript programmer...but I'm trying to put together a simple
menu system for a new website and need a little help.
I have the following script:
<SCRIPT language=javascript>
<!-- Hide JavaScript from Java-Impaired Browsers
function NavRollOver(oTd) {if (!oTd.contains(event.fromElement))
{oTd.bgColor="#CC0000";}}
function NavRollOut(oTd) {if (!oTd.contains(event.toElement))
|
by: mahesr |
last post by:
I want to match some particular text between <tr>and </tr> or <td>and </td>....
in PHP.
like below............
<table><tr>
CATEGORY:
<td><font face="Verdana" size="1" color="#A000A0">
Wedding
Accessories
|
by: Michael |
last post by:
Hi. I need dinamically calculate input text field based on parent static TD
before showing content of input. Please, advice.
Michael
|
by: Peter Boritz |
last post by:
I am new to Tidy and am using the .Net version.
Tidy is picking up <span> tags nested inside of <td>. These are the result of Microsoft Clipboard GetData(HTML) which does a pretty sloppy job in a drag and drop operation.
<td align="right"><span style="font-family: Times New Roman; font-size: 80%"> </span> </td>
<span> inside of <td> is not permitted. Is there a way to set the Tidy options to fix or remove these <span> tags?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |