papillonstudios Posted August 26, 2010 Share Posted August 26, 2010 I am trying to remove all space between table cells using css. For a navigation bar. that is made up of completely images. Im not sure whats going to but after everything i have tried there is still a 1px space in between each image. what am i not doing? <table> <tr> <td><img src="images/navbar/episodes.png" /></td> <td><img src="images/navbar/videos.png" /></td> <td><img src="images/navbar/news.png" /></td> <td><img src="images/navbar/forums.png" /></td> <td><img src="images/navbar/store.png" /></td> <td><img src="images/navbar/contact.png" /></td> <td><img src="images/navbar/panelRight.png" /></td> </table> .navbar { padding-top:10px; } .navbar table { border-collapse: collapse; margin-left:auto; margin-right:auto; width:auto; } .navbar td { border:0; margin:0; } Quote Link to comment https://forums.phpfreaks.com/topic/211820-table-spacing/ Share on other sites More sharing options...
Omirion Posted August 26, 2010 Share Posted August 26, 2010 If you want the hard fix. If you assign the images to each TD's background with CSS you can avoid the space. But you have to assign a different id to each one. Or make a JS function to do it dynamically. If you need help with the JS fix post here i'll se what i can do. I'm currently trying to figure away of doing it with <img>. Quote Link to comment https://forums.phpfreaks.com/topic/211820-table-spacing/#findComment-1104125 Share on other sites More sharing options...
iPixel Posted August 26, 2010 Share Posted August 26, 2010 dont forget to use padding:0px on .navbar td {} Quote Link to comment https://forums.phpfreaks.com/topic/211820-table-spacing/#findComment-1104132 Share on other sites More sharing options...
papillonstudios Posted August 26, 2010 Author Share Posted August 26, 2010 dont forget to use padding:0px on .navbar td {} all spacing is gone thanks Quote Link to comment https://forums.phpfreaks.com/topic/211820-table-spacing/#findComment-1104170 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.