CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 8th, 2002, 04:42 PM
elevati0n's Avatar
elevati0n elevati0n is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 7 elevati0n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CSS Cellspacing - Cellpadding

I've been reading on the internet and getting conflicting info. I would like to move the cellspacing and cellpadding attributes into my css sheet. How would I go about this?

<HTML><HEAD><TITLE>TEST</TITLE></HEAD><BODY>
<LINK REL=STYLESHEET TYPE=TEXT/CSS HREF=style.css>

<BR><CENTER>
<TABLE CELLPADDING=0 CELLSPACING=0><TR>
<TD><TABLE CELLPADDING=0 CELLSPACING=0><TR>
<TD WIDTH=100% COLSPAN=2><IMG SRC=img/header.gif></TD></TR>

<TR><TD WIDTH=22% VALIGN=TOP BACKGROUND=img/navbg.gif>
&nbsp;&nbsp;<A CLASS=MENU HREF=index.php>Link #1</A><BR>
&nbsp;&nbsp;<A CLASS=MENU HREF=index.php>Link #1</A><BR>
&nbsp;&nbsp;<A CLASS=MENU HREF=index.php>Link #1</A><BR>
&nbsp;&nbsp;<A CLASS=MENU HREF=index.php>Link #1</A><BR>
&nbsp;&nbsp;<A CLASS=MENU HREF=index.php>Link #1</A><BR>
<BR></TD><TD VALIGN=TOP>

CONTENT AREA

</TD></TR></TABLE>
</TD></TR></TABLE>
</CENTER>
</BODY>
</HTML>

Last edited by elevati0n : September 8th, 2002 at 04:54 PM.

Reply With Quote
  #2  
Old September 8th, 2002, 05:33 PM
InOblivion InOblivion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Norway
Posts: 34 InOblivion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
<style type="text/css">
<!--
table {
padding: 2px;
}
-->
</style>

Reply With Quote
  #3  
Old September 8th, 2002, 05:39 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
I've never looked into the CellSpacing before.

Found these:
http://selfhtml.teamone.de/css/eige...#border_spacing
http://www.milov.nl/forum/1/158

Reply With Quote
  #4  
Old September 9th, 2002, 01:18 AM
elevati0n's Avatar
elevati0n elevati0n is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 7 elevati0n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
border-collapse: collapse; /* ie6 ? */
border-spacing: 0; /* px? ns 6? */

This combo got it down to 1px but I still had white space. From what I read the above tags only work with new browsers. CSS has too many quirks.

CSS is a great concept but I can't stand the way it's been, being implimented.

TABLE.MAIN {
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-left: 0px;
padding-right: 0px;
padding-bottom: 0px;
border-color: black;
border-style: solid;
border-top-width: 2;
border-left-width: 2;
border-right-width: 2;
border-bottom-width: 2
border-spacing: 0;
border-collapse: collapse;
}

Reply With Quote
  #5  
Old September 9th, 2002, 06:21 AM
InOblivion InOblivion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Norway
Posts: 34 InOblivion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Quote:
Originally posted by elevati0n
CSS is a great concept but I can't stand the way it's been, being implimented.

TABLE.MAIN {
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-left: 0px;
padding-right: 0px;
padding-bottom: 0px;
border-color: black;
border-style: solid;
border-top-width: 2;
border-left-width: 2;
border-right-width: 2;
border-bottom-width: 2
border-spacing: 0;
border-collapse: collapse;
}



You can narrow all that down into something like this:

table.main {
margin: 0px;
padding: 0px;
border: 2px solid black;
border-spacing: 0px;
border-collapse: collapse;
}

Reply With Quote
  #6  
Old September 9th, 2002, 07:50 AM
elevati0n's Avatar
elevati0n elevati0n is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 7 elevati0n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no those are just all the tags i tried, still no luck with the cellspacing though.

Reply With Quote
  #7  
Old September 9th, 2002, 09:22 AM
InOblivion InOblivion is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Norway
Posts: 34 InOblivion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Re: CSS Cellspacing - Cellpadding

Quote:
Originally posted by elevati0n
<HTML><HEAD><TITLE>TEST</TITLE></HEAD><BODY>
<LINK REL=STYLESHEET TYPE=TEXT/CSS HREF=style.css>
...



Btw, the link tag is supposed to be in the head tag, not the body tag.

Reply With Quote
  #8  
Old October 16th, 2003, 02:32 PM
cosmic's Avatar
cosmic cosmic is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: West Midlands, UK
Posts: 2 cosmic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to cosmic
This is the code I use (with formatting taken out, of course)...

TABLE {
border-spacing: 0px;
border-collapse: collapse;
}
TD {
margin: 5px;
padding: 5px;
}

That works in IE and Netscape. I haven't tried with older browsers, but the newest versions seem as happy as they come with that code. That means you just use 2 lines of code to tell the browsers do have no margins... if it doesn't work in the older browsers, then just chuck in:

margin: 0px;
or
padding: 0px;

And one of those 2 will sort it out. I forget which, but one of them will. As long as the browser you're using supports CSS - haha.

Remember also that if you just want margins on one side, for example, you can type:

margin: 0px;
margin-bottom: 5px;

So you don't need to type 4 lines of code when 2 will do.

Hope I could help!

Reply With Quote
  #9  
Old October 16th, 2003, 02:40 PM
dlhdesign's Avatar
dlhdesign dlhdesign is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 18 dlhdesign User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I use the following. I've yet to find a more complete compilation of CSS properties (aside from MSDN for IE, but that's a pain to use).

CSS Property Index

(There's also an HTML index for those interested.)

Reply With Quote
  #10  
Old October 16th, 2003, 03:21 PM
cosmic's Avatar
cosmic cosmic is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: West Midlands, UK
Posts: 2 cosmic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to cosmic
Maybe Netscape and Microsoft should use this list and save everyone the hassle...

Reply With Quote
  #11  
Old October 30th, 2003, 04:37 PM
newtrickz newtrickz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 3 newtrickz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Remember also that if you just want margins on one side, for example, you can type:

margin: 0px;
margin-bottom: 5px;

So you don't need to type 4 lines of code when 2 will do.

or even 1 line:
margin: 0px 0px 2px 0px;
(top right bottom left)


sorry to bring up an old post, couldn't help helping

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS Cellspacing - Cellpadding


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway