473,396 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

table cellpadding and cellspacing in stylesheet

On my webpage (http://www.classiccat.net/index.htm) I tried to transfer the
cellpadding/spacing attributes to my stylesheet. However, somehow it doesn't
work. I tried to look it up on the internet, but it seems to me that I am
doing everything right, which is obviously not the case.

It concerns the tables in the alphabetic part of the page. I have there a
table-class "block" defined. It works fine in giving the tables their
background-color. But somehow the padding and spacing have no effect.

Please give me feedback.

Thanks,

Wim
Jul 20 '05 #1
4 29371
Hi,
Just to be complete:

The relevant code from the html page is:
<table BORDER=0 width=100% class=block><tr class=kop><td colspan=3>

The relevant code from the stylesheet is
table.block
{ background-color:#e3e3fa;
font-size: 84%;
border-spacing: 0px;
}

TABLE.block TD { padding : 0px; }

Wim

"Wim Roffal" <wi*************@nospamm-planet.nl> schreef in bericht
news:cd**********@reader10.wxs.nl...
On my webpage (http://www.classiccat.net/index.htm) I tried to transfer the cellpadding/spacing attributes to my stylesheet. However, somehow it doesn't work. I tried to look it up on the internet, but it seems to me that I am
doing everything right, which is obviously not the case.

It concerns the tables in the alphabetic part of the page. I have there a
table-class "block" defined. It works fine in giving the tables their
background-color. But somehow the padding and spacing have no effect.

Please give me feedback.

Thanks,

Wim

Jul 20 '05 #2
"Wim Roffal" <wi*************@nospamm-planet.nl> wrote:
border-spacing: 0px;


IE does not support the border-spacing property.

However, if you wish to set the spacing to zero, you can achieve the
effect by using
border-collapse: collapse;
which is fairly well supported.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3
Wim Roffal wrote:
On my webpage (http://www.classiccat.net/index.htm) I tried to
transfer the cellpadding/spacing attributes to my stylesheet.

Please give me feedback.


Consider reading the thread that is merely days old, on the very topic
if translating table presentation attributes into css.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4
Wim Roffal wrote:
The relevant code from the html page is:
<table BORDER=0 width=100% class=block><tr class=kop><td colspan=3>

The relevant code from the stylesheet is
table.block
{ background-color:#e3e3fa;
font-size: 84%;
border-spacing: 0px;
}


Quick answer: don't mix presentation html and css unless necessary. In
this case, you table needs only

<table cellspacing="0" class="block">

That will help with the spacing. Everything else that you want can be
done in css, which is probably the best place for it.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John | last post by:
I have a table with two rows. On the first row is a text box and in the second row is an image. I have set the table cellpadding to 0 and cellspacing to 0. The table is leaving extra spaces in the...
1
by: andrewkooi | last post by:
Greetings, I have 16 links for my horizontal menu navigation as you can see in my website www.singakad.com and at present, I am using a table and javascript for this menu. Is it possible for...
5
by: cool2005 | last post by:
I have a table contains 4 cells (2 x 2) like this http://www.coolshare.com/planttrade/temp/gap.jpg each cell contains a div and the div contains a table. As you can see from the image above,...
4
by: Martin Eyles | last post by:
Hi! I am trying to make several 1x3 tables on a webpage, where all three cells have black backgrounds and white text. However, I want the space around each of the cells, and the whole box to be...
3
by: lovely_angel_for_you | last post by:
Hi, I have following link. By visitng first in IE, and then in Firefox, you would get to know my issue. http://lovely.angel.for.you.googlepages.com/test.htm...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
9
by: vozzek | last post by:
Hi all, This has been haunting me for over 2 hours now, and I can't understand what's wrong with it. My shopping cart table's format is misaligned, and I have no clue why. Please help! Here's...
0
by: vozzek | last post by:
EDIT: Nevermind, I fixed this by using a <BR /> instead of trying to write option_a to a new row of the table. Thanks all! Hi all, This has been haunting me for over a day now, and I can't...
1
by: muneebkiani | last post by:
<?php session_start(); $username=$_SESSION; if($username=="") header("location:login.php"); if($_SESSION!=1) header("location:login.php"); include('include/connect.inc.php');...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.