Set Font Size in Tables Using DHTML

Set Font Size in Tables Using DHTML

Question:

In Microsoft Internet Explorer, I can specify a style as

TABLE.listTable { font-size : "10pt"}

and all the cells of the table will have a 10pt font size.

In Netscape, this approach doesn’t work because the font sizes have to be specified for each cell (), and any font specification you do at the table level doesn’t apply to each cell. Can you suggest a solution so I don’t have to specify something like

classes.listTable.td.fontSize = "10pt"

and add the CLASS=listTable to each ?

Answer:

You can specify a setting for table cells (TD) elements using a style sheet:

  TD { color: red; font-size: larger }

However, you have to be careful of your use of other style and formatting with the table as this can override the TD setting. For instance, not closing a table element, or using nested elements can turn off the global style setting.

For example, define a global style setting using:

and then create a table like this:

Hello there

The table contents will show red, with a larger font size, for Netscape Navigator 4.x and up, and IE 4.x and up, in a Windows environment.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as