topher100 Posted January 29, 2010 Share Posted January 29, 2010 Hi there,Just having a bit of problem with a website I'm building. I'm sure it's something very obvious as I'm not exactly pro at this. I'd really appreciate if someone can see where I'm going wrong.Here's my page so far http://www.brighton-solar.com/tempMy problem is that I have built the layout using tables and set the cell sizes using css. I have added a background image for each cell using css and the images are the same sizes as the cell that they sit in..... but... each cell appears to be a pixel or two larger than the image even though the values are identical. I have set my cell backgrounds bright red so this is very easy to see...Any ideas?? thanks in advance. Here's my css below td.left {width:120px; background-image: url(images/slice2.jpg);background-repeat: no-repeat;}td.menu {width:193px; background-image: url(images/slice3.jpg);background-repeat: no-repeat;}td.main_header {width:503px; height:170px; background-image: url(images/slice4.jpg);background-repeat: no-repeat;}td.right {width:212px; background-image: url(images/slice5.jpg);background-repeat: no-repeat;}td.main {width:503px; background-image: url(images/slice7.jpg);background-repeat: no-repeat;}td.main_footer {width:503px; height:54px; background-image: url(images/slice8.gif);background-repeat: no-repeat;} Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted January 29, 2010 Share Posted January 29, 2010 You need to take into account any border, padding or spacing that may be being applied to the cells. Set everything to 0 in the css. Link to comment Share on other sites More sharing options...
topher100 Posted January 29, 2010 Author Share Posted January 29, 2010 You need to take into account any border, padding or spacing that may be being applied to the cells. Set everything to 0 in the css.Thanks but I have all those set to 0 elsewhere in the css.... Link to comment Share on other sites More sharing options...
ShadowMage Posted February 1, 2010 Share Posted February 1, 2010 Maybe border-collapse? table {border-collapse: collapse;} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.