tomatoKetchup Posted October 29, 2014 Share Posted October 29, 2014 Hello, I made a table like this : <table id="floatMenuTable"> <tr> <td><a href="constitutionLaw.html"><img src="Data/Main/Section1.png"></a></td> <td></td> </tr> <tr> <td></td> <td><a href="constitutionLaw.html"><img src="Data/Main/Section2.png"></a></td> </tr> <tr> <td><a href="constitutionLaw.html"><img src="Data/Main/Section3.png"></a></td> <td></td> </tr> <tr> <td></td> <td><a href="constitutionLaw.html"><img src="Data/Main/Section4.png"></a></td> </tr> <tr> <td><a href="constitutionLaw.html"><img src="Data/Main/Section5.png"></a></td> <td></td> </tr> <tr> <td></td> <td><a href="constitutionLaw.html"><img src="Data/Main/Section6.png"></a></td> </tr> </table> But when I render it on a browser, I get what's in the image attached (the cells have automatically been outlined by the software Brackets). Do you notice the spaces between the cells? Why are they here? I made sure no CSS property make them appear, so why are they still here? Am I missing something? Thanks for your help! Thomas Link to comment Share on other sites More sharing options...
niche Posted October 29, 2014 Share Posted October 29, 2014 (edited) This will begin to answer your question: http://www.w3schools.com/css/css_boxmodel.asp There's no css in your script. You should do the css tuts. It doesn't appear so. Edited October 29, 2014 by niche Link to comment Share on other sites More sharing options...
Ingolme Posted October 29, 2014 Share Posted October 29, 2014 Tables always have space between the cells by default. You can use the CSS border-spacing property to reduce the space between table cells. You can use border-collapse on the table to make the table cells share the same border. Link to comment Share on other sites More sharing options...
Ingolme Posted October 29, 2014 Share Posted October 29, 2014 This will begin to answer your question: http://www.w3schools.com/css/css_boxmodel.asp There's no css in your script. You should do the css tuts. It doesn't appear so. Table cells behave differently than the standard box model. The box model only applies to block elements, there are many other rendering modes than block, this is a list of all of them: http://www.w3schools.com/cssref/pr_class_display.asp Link to comment Share on other sites More sharing options...
tomatoKetchup Posted November 3, 2014 Author Share Posted November 3, 2014 Thanks for the answers (and sorry for the late reply...). I forgot to say that I had a css file and I had tried different margin a padding properties with the tables as well as border-spacing without any success. However I might have skipped the "border-collapse" one because indeed I got those spaces finally gone after a new attempt. Thank you Ingolme for the tip. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now