473,969 Members | 3,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 29392
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
7875
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 rows on the top and bottom of the picture and image. I need to make the height of the rows to be the same as the textbox and image. How do I do this? I have tried even setting the height of the table and all the <td> and <tr> tags to 1 but have...
1
2022
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 me to create a submenu for certain cells in this horizontal menu? How do I go about doing this? Thank you in advance for any assistance given.
5
1986
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, there are gap between these 4 cells of the top level table. I tried to use "cellspacing=0 cellpadding=0" on the top level table and "align valign" on each td and tr but still couldn't remove
4
1740
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 coloured (see http://www.bytronic.com/martinTest/table.gif). I will be programatically changing the colour of this border on the client side, based on data from an embeded asp.net page. Is there a way I can set the html/css up so that I can do...
3
10257
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 http://www.geocities.com/lovely_angel_for_you/test.htm To explain in simple terms, the CSS code that I am using is not providing the colors to Table backgrounds.
2
16438
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 to overlap correctly. You can see it on this page: www.creativekaysjewelry.com The images overlap exactly how I wanted and in the right position
9
2105
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 a snapshot of the misaligned portion of the screen: snapshot link Here's the code leading up to it. (Note: This code is generated through some conditional PhP statements):
0
1278
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 understand what's wrong with it. My shopping cart table's format is misaligned, and I have no clue why. Please help! My PHP code is pulling the cart contents from my SQL database, and then generating html to create the format. The html looks fine,...
1
2063
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'); $user=$_SESSION;
0
10315
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11785
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11368
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10856
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10047
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8422
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.