Having a very bad day :(
Why does .NET default to CellPadding and CellSpacing of 2?!
How on earth can I set them to all be 0.
I tried adding a table style to the style sheet, but cellpadding and cellspacing do not come up in intelisense :(
Any ideas?
WokaWhy is that VS.NET's fault? :rolleyes:
For cellpadding:
padding: 0 0 0 0;
For cellspacing, it's best to leave it in the table tag, I haven't seen a 'universal' solution to cellspacing in CSS.
That's what I would have thought.
In my CSS file I have:
TABLE
{
border: solid 0px Red;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
TR
{
border: solid 0px Blue;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
TD
{
border: solid 0px Lime;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
Yet, as you can see from the attached pic, the images do not sit next to each other.
I am forced to add cellpadding and cellspacing to the table directly in my ASPX page (code in front).
The border props are only there for testing. The tables and cells etc do take on all the properties from my style sheet, apart from the cellpaddingthing etc :(
WOka
You should be using floating div's for a menu control anway ;)
Anyway, those 'cells' could be easily duplicated with span tags with a style padding of 10px.
<span style="padding:5px;">Home</span><span style="padding:5px;">About Us</span><span style="padding:5px;">Products</span>
Showing posts with label cellspacing. Show all posts
Showing posts with label cellspacing. Show all posts
Saturday, March 31, 2012
Wednesday, March 28, 2012
Tables
Newbie here.
Where do you see those spaces? In the designer or in the resulting
webpage in the browser?
The designer might show spaces (and borders) to make the layout clear.
If in the browser, check the resulting html code ("view source") to see
if you can find a reason for those spaces there.
I'm hasving trouble with tables in Visual Web Developer Express.
I've set cellspacing and cellpadding to zero, but there's spaces around
objects in my table.
Any idea what's going wrong?Hi
Check whether you have assigned some width for every table cell (<td>),
which is giving you this experience. Try to set the width as zero and see how
it appears.
Prem
Newbie here.
Quote:
Originally Posted by
>
I'm hasving trouble with tables in Visual Web Developer Express.
>
I've set cellspacing and cellpadding to zero, but there's spaces around
objects in my table.
>
Any idea what's going wrong?
Where do you see those spaces? In the designer or in the resulting
webpage in the browser?
The designer might show spaces (and borders) to make the layout clear.
If in the browser, check the resulting html code ("view source") to see
if you can find a reason for those spaces there.
Hans Kesting
Subscribe to:
Posts (Atom)