AticusFinch AticusFinch - 6 months ago 35
HTML Question

Placing a div inside a table cell

I'm trying to get a DIV element into a table cell, in a way in which the

spreads along all the cell's area. But, for unknown reason, a 1px
appears; as far as I know, it's neither part of the table or the div (table has no borders, padding or spacing, and the div has no margin or padding). Perhaps you can spot me the bug?

<style type="text/css">
#arrow {
border-style: solid;
margin: 0;
padding: 0;
border-width: 100px 0px 100px 50px;
border-color: blue blue blue red;

table {
border-collapse: collapse;
border-style: none;
padding: 0px;
spacing: 0px;

<td bgcolor="red">
<div id="arrow"><!----></div>
<td bgcolor="blue">

Answer Source
<table cellspacing="0" cellpadding="0" border="0">

-- or --

td { padding:0 }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download