Jump to content


Photo

is it possable to set the background-color and color to valadate as valadated.


  • Please log in to reply
13 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:37 PM

Hi there all hope alls ok.

Is it possable to get the css to validate as valid css if you set the background-color and color the same or do you have to do some fancy work as inherit but how?

example
P
{
color:red;
background-color:red;
}

As you no if you set the color and background color the same you get warnings form valadation w3c has anyone found a way to stop the warnings and set both as the same color for background color and color.

Thank you.




Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 October 2006 - 02:39 PM

why would you want to do such a thing? You can do it with javascript.

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:41 PM

so what your say is to countinue to set other colors within p div ect ect.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:43 PM

ok i see thanks solved and yes i look at javascript method later ok cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:46 PM

see my example below i dont think the font color will be yellow as color is red so i got to set another p to get the color yellow madness ?

P
{
color:red;
background-color:red;
font-color: yellow;
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 October 2006 - 02:47 PM

There is no font-color option

Use color to set the color of the text

ANd no you cant set text to have two colors in the same class/id/element

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:50 PM

sorry i posted that wrong and yes you see the situation i put my self under and thank you i think i under stand know.


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 October 2006 - 02:53 PM

another thing as i am going throw the tutoral i am creating and also reading the css bible it states that shorthand code is not recomended but what your reel world fellings.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 09 October 2006 - 05:37 PM

I believe that for colors there is a value option called transparent. You could use that for the color attribute.

#10 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 October 2006 - 01:46 PM

can you give me an example of the code for transparent for the color property thank you.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#11 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 10 October 2006 - 01:55 PM

I guess:
color: transparent


#12 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 October 2006 - 02:01 PM

Thank you wildteen.

wildteen or someone can exsplain why do guru say dont use tables and use the css atubutes.

i use tables and css in all my coding and it is fully valadated and well designed have i got to change my method know as i am getting into css or can i still use my good old tables for design purpose.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#13 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 10 October 2006 - 02:10 PM

google 'tableless design'
follow me on twitter @PHPsycho

#14 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 10 October 2006 - 02:31 PM

Tables are not ment for layouts. They are mean for displaying tabular data, such as showing temeraters throughout the year.

Tabled layouts are easy to do yes. However for me tableless layouts are a lot easier. Plus you get the benefit of coding less HTML, smaller file sizes. You can get a two colmn layout with a header done with just 3 div tags and a few lines of CSS. Where as if its tables it'll be more like 10 or more tags.

CSS is specifically designed to style your layouts. Not HTML. HTML is just the blue print of your website.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users