Results 1 to 4 of 4

Thread: Table...StyleSheet...CellPadding = 0, I can't do it :(

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Table...StyleSheet...CellPadding = 0, I can't do it :(

    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?

    Woka

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Table...StyleSheet...CellPadding = 0, I can't do it :(

    Why is that VS.NET's fault?

    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.

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Table...StyleSheet...CellPadding = 0, I can't do it :(

    That's what I would have thought.
    In my CSS file I have:
    Code:
    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
    Attached Images Attached Images  

  4. #4
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Re: Table...StyleSheet...CellPadding = 0, I can't do it :(

    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.

    HTML Code:
    <span style="padding:5px;">Home</span><span style="padding:5px;">About Us</span><span style="padding:5px;">Products</span>
    Last edited by nemaroller; Jun 2nd, 2005 at 04:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width