Jump to content

Space between cells in a table


tomatoKetchup
 Share

Recommended Posts

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

post-178046-0-63252000-1414596819_thumb.png

Link to comment
Share on other sites

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 by niche
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...