Sijun Forums Forum Index
Log in to check your private messages
My Profile Search Who's Online Member List FAQ Register Login Sijun Forums Forum Index

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Sijun Forums Forum Index >> Random Musings
View previous topic :: View next topic  
Author   Topic : "Css Problem"
AndyT
member


Member #
Joined: 24 Mar 2002
Posts: 1545
Location: Germany

PostPosted: Mon Nov 10, 2003 10:05 am     Reply with quote
A question for the CSS experts:

I have a table with a certain background color.
A cell with a different background color is always surrounded by a border.
What can I do to change that?

I use border-collapse ... padding, border and margin are set to "0".
_________________
http://www.conceptworld.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elam
member


Member #
Joined: 27 Sep 2000
Posts: 456
Location: Motown

PostPosted: Mon Nov 10, 2003 7:13 pm     Reply with quote
Couple of ways.

in your style sheet put:

td {
border: none;
}

or in your html put

<td style="border: none;"> .... </td>

for every cell.
Back to top
View user's profile Send private message Send e-mail
AndyT
member


Member #
Joined: 24 Mar 2002
Posts: 1545
Location: Germany

PostPosted: Tue Nov 11, 2003 8:04 am     Reply with quote
I tried what you wrote ... guess that would have been a little too easy Crying or Very sad

That's what it currently looks like (depending on background color):


That's how I want it:


Code:
BODY
{ color: #000000;
  background-color: #EEEEEE;
  padding: 0;
  margin: 0; 
  font-family: geneva, lucida, sans-serif, arial;
  text-align: center; 
}

TABLE
{ border-collapse: collapse; 
  border: none;
  padding: 0;
  margin: 0;
  font-size: 10pt;
  text-align: Center;
  vertical-align: Middle;
}

TABLE.main
{ border-collapse: collapse;
  background-color: #CCCCCC;     
  width: 80%; 
}

FONT.important
{ color: #FF9900;
  font-weight: bold;
  font-size: 20pt;
}

DIV
{ text-align: left;
}

FONT.texts
{ color: #000000;
  font-size: 11pt;
}

TD
{
  border: none;
}

TD.head
{ color: #FFFFFF;
  padding: 4pt;
  text-align: left;   
  background-color: #003366;
}

IMG
{ border: 0;
}

_________________
http://www.conceptworld.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elam
member


Member #
Joined: 27 Sep 2000
Posts: 456
Location: Motown

PostPosted: Tue Nov 11, 2003 8:44 am     Reply with quote
Just curious, did you try viewing these in Mozilla? It has better css support than IE, so I always test my pages in that first.

I did a quick test of the css u posted, using the classes for td and table, and I'm not getting borders. Maybe u could post the relevant HTML?
Back to top
View user's profile Send private message Send e-mail
gLitterbug
member


Member #
Joined: 13 Feb 2001
Posts: 1340
Location: Austria

PostPosted: Tue Nov 11, 2003 8:58 am     Reply with quote
nevermind
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
AndyT
member


Member #
Joined: 24 Mar 2002
Posts: 1545
Location: Germany

PostPosted: Tue Nov 11, 2003 9:20 am     Reply with quote
elam: Thanks ... good to know!
I'll play a little with the HTML part myself ...
I tried it with IE (CrazyBrowser), NS, Opera and Mozilla Firebird.

gLitterbug:
Ok! Wink

Code:
<td align="center"><br />
            <table bgcolor="#003366" width="95%" align="center">
            <tr>
            <td bgcolor="#CCCCCC"><div><font class="texts"><b>Text</b></font></div></td>            
            <td width="200px" style="border: none;"><img src="skin/static/content_eng.gif" alt="Content"></img></td>
            </tr>
            <tr>
            <td bgcolor="#CCCCCC"><div><font class="texts">Text<br />
            </font></div></td>         
            <td class="head">HTML / CSS<br />Php / MySql<br />Javascript<br />Flash</td>
            </tr>
            </table><br />
</td>


The table is blue but on a gray background.
The bg of the image is gray. The same happens if the bg of the cell is gray.
_________________
http://www.conceptworld.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elam
member


Member #
Joined: 27 Sep 2000
Posts: 456
Location: Motown

PostPosted: Tue Nov 11, 2003 9:31 am     Reply with quote
No borders for me, with or without a color change.
Could be that you have unmatched closing tags somwhere, like a missing </div>

Kinda hard to trouble shoot these things without seeing the enitire page. Gotta url?
Back to top
View user's profile Send private message Send e-mail
AndyT
member


Member #
Joined: 24 Mar 2002
Posts: 1545
Location: Germany

PostPosted: Tue Nov 11, 2003 9:38 am     Reply with quote
Damn ... ok here it is Embarassed :
http://folio.andyart.de/index_eng.html

[edit]Please don't laugh[/edit]
_________________
http://www.conceptworld.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elam
member


Member #
Joined: 27 Sep 2000
Posts: 456
Location: Motown

PostPosted: Tue Nov 11, 2003 9:53 am     Reply with quote
No laughs here! Looks good.

The problem is the 'border' thats appearing is due to the padding in the cell. Theres no actual border, its just the underlying background color of the table showing through.

Add a style="padding: 0px;" to the offending cell. Should disappear.
Back to top
View user's profile Send private message Send e-mail
AndyT
member


Member #
Joined: 24 Mar 2002
Posts: 1545
Location: Germany

PostPosted: Tue Nov 11, 2003 10:27 am     Reply with quote
D'oh! Thanks!!!!
Must be the only thing I haven't tried.

I thought padding: 0; for the whole table would affect all cells.

Quote:
No laughs here! Looks good.

Thanks again Wink
_________________
http://www.conceptworld.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Sijun Forums Forum Index -> Random Musings All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2005 phpBB Group