?
Solved

How to control table row height in mozilla / strict DTD?

Posted on 2006-11-02
2
Medium Priority
?
369 Views
Last Modified: 2013-11-19
What is the correct way to use strict doctypes in Mozilla and yet have the top and bottom row of my table repect the required image height ( 5px ).  As far as I know, the height tag for table columns is depreciated in favour of CSS and yet I can't seem to get the rows/columns to fit snug.

<style type="text/css">
<!--
.template_content {
      height:      5px;
}

.template_content img {
      padding: 0px;
      margin: 0px;
}
-->
</style>

<table width="100%" style="margin-bottom: 10px" border="0" cellpadding="0" cellspacing="0" %attr%>
      <tr>
            <td class="template_content" width="5"><img src="/members/images/content/content_tl.gif" width="5" height="5"></td>
            <td class="template_content" background="/members/images/content/content_top.gif"></td>
            <td class="template_content" width="5"><img src="/members/images/content/content_tr.gif" width="5" height="5"></td>
      </tr>
      <tr>
            <td background="/members/images/content/content_left.gif"></td>
            <td background="/members/images/content/content_bkg.gif"><!--%CONTENT%--></td>
            <td background="/members/images/content/content_right.gif"></td>
      </tr>
      <tr>
            <td class="template_content"><img src="/members/images/content/content_bl.gif"></td>
            <td class="template_content" background="/members/images/content/content_bottom.gif"></td>
            <td class="template_content"><img src="/members/images/content/content_br.gif"></td>
      </tr>
</table>
0
Comment
Question by:rivusglobal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
VirusMinus earned 2000 total points
ID: 17864337
I managed to isolate the problem and came up putting a display:block on .template_content img. Everything else i tried didn't quite work. (i tried table-layout: fixed, spacer gif's, display: block on the cell etc etc)

so you have:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
      <title>Untitled</title>
      <style type="text/css">
      <!--
      .template_content {height: 5px; border: 1px solid #000;}
      .template_content img{display: block;}
      -->
      </style>
</head>

<body>


<table width="100%" border="0" cellpadding="0" cellspacing="0" >
      <tr>
            <td class="template_content" width="5"><img src="images/arrow_bent.gif" width="5" height="5"></td>
            <td class="template_content" width="5"><img src="images/arrow_bent.gif" width="5" height="5"></td>
      </tr>
</table>


</body>
</html>
0
 
LVL 10

Author Comment

by:rivusglobal
ID: 17864370
Yeah that's the ticket, thank you.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question