Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell with borders

Status
Not open for further replies.

kiteflyer

Programmer
Dec 11, 2003
10
0
0
US
I am starting to use Dreamweaver MX, and here is a problem that seems to be typical.

I set up a stylesheet, and attach it to my page. I define a new class (for a table), and assign a border to it. Now I apply that class to a cell (600px x 50px), and it draws the border just fine. But.....

The cell is now rendered too large - in other words, it looks like DW expects me to count the pixels for the border and reduce the cell size by that amount.

What happens if I change the border from "thick" to "thin"? Resize my cell again? I must be doing something wrong. What is it?

I've simple made a "layout table" 600x50, and placed a cell in it (600x50).

Thanks for any help....JP Harrison
 
Oops.... I just realized what I did - I applied the class to the TABLE, not to a CELL within the table.... my bad.

Also, I have now realized that if you attempt to drop an image onto a table (not onto a cell within the table, nothing happens - or more accurately, it puts the image in the wrong place. Well, you HAVE to have a cell in which to place the image. Stupid me.

JP
 
Hi kiteflyer!
nothings stupid about you that I can see.....u did more than most people here...which is FIND the answer, way to go!
Now, if u really would like to use a single image in a table (as a background) u can use CSS to set that image and position it with respect to the table.
eg.
=================table============
-----img---------


------img--------



===================================

Code:
<style>
#MY_TABLE_NAME {
 background-image: url(../images/background.jpg);
 background-repeat: no-repeat;
 background-position: 330px 202px;
}
</style>
<Table width=649 BORDER=0 CELLPADDING=0 CELLSPACING=0 id="MY_TABLE_NAME">
.....
</Table>

or u can make a CSS class and assing it to the table as well (vs. css ID used above)

.my_class{
...
}
< table width=649 BORDER=0 class="my_class"...>

All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top