Skip to main content
Participating Frequently
January 19, 2018
Answered

column widths appear wider than they should

when I create a table, I add column to have vertical line dividers. I assign them to be 1 pt wide. Coding shows them as 1 pt wide. However when viewed browser, they appear wider than 1 pt. What am I doing wrong. How can I fix?

example code:

<td width="1" bgcolor="#FF9900"> </td> -- this is what I want as a think line divider. But shows wider than 1pt.  Thanks for any help!!

<table width="550" border="0">

<tr>

    <td colspan="4"><hr></td>

  </tr>

<tr>

   <td width="164"><a href="http://corp.abc.com"><img name="" src="https://www.thinkedu.com/images/thinkEDU-logo_tag_noncom_150.jpg" width="150" height="61" alt="ThinkEDU Logo"></a></td>

   <td width="1" bgcolor="#FF9900"> </td>

   <td width="9" valign="top"><br></td>

   <td width="358" valign="top"><font size="1" color="000000" face="Verdana, Arial, Helvetica, sans-serif"><strong>Allan David | Chief Operating Officer</strong><br>

     ABC, LLC | www.xyz.com<br>

   </font></td>

</tr>

</table>

This topic is closed to new replies. Start a new post to keep the conversation going.
BenPleysier
BenPleysierCorrect answer
Community Expert
January 20, 2018

1pt = 1.33333333333px

Having said that, eachbrowser has default settings of its own. Sometimes they may be the same across browsers, sometimes they differ. For that reason, many developers use a so called CSS reset.

To illustrate the default setting of the browser for a table cell, add the following style rules to your document.

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

<style>

td {

margin: 0;

padding: 0;

}

</style>

</head>

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!

15 replies

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
January 20, 2018

1pt = 1.33333333333px

Having said that, eachbrowser has default settings of its own. Sometimes they may be the same across browsers, sometimes they differ. For that reason, many developers use a so called CSS reset.

To illustrate the default setting of the browser for a table cell, add the following style rules to your document.

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

<style>

td {

margin: 0;

padding: 0;

}

</style>

</head>

Translate
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
B i r n o u
Legend
January 20, 2018

Hello Ben,

could you detail the report that you install between the relation pixel / point on the one hand and the reinitialization of the defaults of properties css on the other hand.

Translate
BenPleysier
Community Expert
Community Expert
January 20, 2018
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!