Log in

View Full Version : please help with css!



evan5
11-08-2008, 11:39 PM
:confused::confused:
Hello, I am trying to have border shading around one of my page parts
the code for it is <td width="60%" valign="top" bgcolor="1C1D1C">
but how do I make it have a fading border. I went to the gradiant maker and found two colors left of shading=1C1D1C and right of shading=D288D4. But how do i make that go on the sides of that table.
Thank you very much!!!

Medyman
11-09-2008, 02:28 AM
I'm not sure I understand what you're asking. Could you try and rephrase the question? Or better yet, provide some sort of graphic of what you mean.

If you're trying to color different sides of a table with different colors, you can use some simple CSS:


table {
border:1px solid gray;
border-top-color:gray;
border-bottom-color:black;
border-right-color:red;
border-left-color:yellow;
}

If you're trying to add a gradient border, that's not currently possible given the level of support for CSS3. CSS3 does allow for image borders created via CSS, but that's not supported by most browsers.

Your option here would be to create an image and add that to the background of your table:


table {
background-image:url(path/to/image);
}

evan5
11-09-2008, 06:12 AM
thanx medyman for the reply! appretiate it
What I mean is that i want the border to be one color then fade out into the backround color :). I thought you could do it with css but I guess not.
Could you please suggest what I should do or what code to use, to have that fading color effect on the border.
Thanx much!!!

TheJoshMan
11-09-2008, 07:11 AM
that is what medyman was explaining to you. CSS2 does not support gradients in CSS... CSS3 does, but the vast majority of browsers today do not support much (if any) CSS3. So, your best option is to make a gradient image and use it as a background of the element you want the gradient fade on.