6 replies [Last post]
filmen
Offline
newbie
Portugal
Last seen: 12 years 39 weeks ago
Portugal
Joined: 2007-10-30
Posts: 8
Points: 0

Hi all,

I have the following CSS styles defined:

table.t1 { width: 710px; height: 32px; margin-left: auto; margin-right: auto; border-width: 0px; border-collapse: collapse; /*background-color: #FFFFFF;*/ } table.t1 td { border-width: 0px; padding: 0px; border-style: none; border-color: white; /*background-color: #FFFFFF;*/ } body.main { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(/imagens/fundo_pagina.gif); }

When I apply class 't1' to a table (table class="t1") it still appears with a border (default color) and the inner cells are padded... CSS validators don't accuse a thing. Could anyone tell me what seems to be the issue here? Thanks.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 20 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Can you please post all your

Can you please post all your code?

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

filmen
Offline
newbie
Portugal
Last seen: 12 years 39 weeks ago
Portugal
Joined: 2007-10-30
Posts: 8
Points: 0

Code

Sure... Sorry. Thanks.

Ambisolar : Energias Alternativas


 

//
// The CSS code, contained in styles.css, is as follows: //
//

table.t1 {
width: 710px;
height: 32px;
margin-left: auto;
margin-right: auto;
border-width: 0px;
border-collapse: collapse;
}

table.t1 td {
border-width: 0px;
padding: 0px;
border-style: none;
border-color: white;
}

body.main {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(/imagens/fundo_pagina.gif);
}

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 20 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Try taking the proceeding

Try taking the proceeding slash off of the link

and see if maybe your paths are messed up.

Second, are you using the tables for tabular data or for a layout?
If it's for a layout, stop now and use DIVs

third - why are you using a transitional doctype on a new site?

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

filmen
Offline
newbie
Portugal
Last seen: 12 years 39 weeks ago
Portugal
Joined: 2007-10-30
Posts: 8
Points: 0

Tables

Thanks for the quick reply.
The paths are not messed up... In fact, the dimensions specified in the CSS styles are applied to the table, as is the border color, for example... Only border thickness and cell padding aren' applied.
Is there any important advantage or urgency in using layers? Because at the moment transitioning from tables to divs could take me some time.
Also, the doctype is automatically defined by my editor and I've not been changing it, since I don't quite understand the main differences between the doctypes.
Greets.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 hours 23 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

I'm unable to replicate your

I'm unable to replicate your issue. With your code, there are no borders and no padding.

This would be a simpler set of style rules,

table.t1 {
  background-color: #ddd; /*for clarity*/
  border: 0 none;
  border-collapse: collapse;
  margin: 25px auto 0;
  width: 210px;
  }

table.t1 td {
  /*border: 1px solid red;*/
  }

Use something you can see as content, eg. a bit of text, "xxx".

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

filmen
Offline
newbie
Portugal
Last seen: 12 years 39 weeks ago
Portugal
Joined: 2007-10-30
Posts: 8
Points: 0

Corrected

Thanks for your inputs. It's working fine now:

table.tmenu { border: none; border-collapse: collapse; } table.tmenu td { padding: 0px; }

These changes are not correctly presented in the WYSIWYG editor and I was therefore induced in error. Smile