CSS border color?

Results 1 to 2 of 2

Thread: CSS border color?

  1. #1
    Join Date
    Dec 1969

    Default CSS border color?

    I&#039;m trying to set the border color of tables in my Cascading Style Sheet.<BR><BR>I have tried to do this two different ways.<BR><BR>#1<BR><BR>.tableborder<BR>{<BR> BORDER-COLOR: #ffba87;<BR>}<BR><BR>#2<BR>.tableborder<BR>{<BR> BORDER-LEFT-COLOR: #ffba87;<BR> BORDER-BOTTOM-COLOR: #ffba87;<BR> BORDER-TOP-COLOR: #ffba87;<BR> BORDER-RIGHT-COLOR: #ffba87<BR>}<BR><BR>I then reference it in the html file like so.<BR><BR>&#060;table border=1 class=tableborder cellspacing="0" cellpadding="0"&#062;<BR><BR>Neither one of these seems to be changing the border colors at all.<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default ya forgot an important property!!

    You need to include the border-style property. This tells the browser whether it&#039;s solid, dashed, etc.... <BR><BR>so try this:border-style: solid; border-width: 1px;<BR><BR>.tableborder <BR>{ <BR> border-color: #ffba87; border-style: solid; border-width: 1px;<BR>}<BR><BR>It&#039;s important to include the width, since the default is ~4px.<BR><BR>Have fun programming,<BR><BR>-Vadim C.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts