redarrow Posted October 9, 2006 Share Posted October 9, 2006 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 [code]P{color:red;background-color:red;}[/code]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. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/ Share on other sites More sharing options...
wildteen88 Posted October 9, 2006 Share Posted October 9, 2006 why would you want to do such a thing? You can do it with javascript. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106264 Share on other sites More sharing options...
redarrow Posted October 9, 2006 Author Share Posted October 9, 2006 so what your say is to countinue to set other colors within p div ect ect. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106267 Share on other sites More sharing options...
redarrow Posted October 9, 2006 Author Share Posted October 9, 2006 ok i see thanks solved and yes i look at javascript method later ok cheers. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106268 Share on other sites More sharing options...
redarrow Posted October 9, 2006 Author Share Posted October 9, 2006 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 ?[code]P{color:red;background-color:red;font-color: yellow;}[/code] Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106269 Share on other sites More sharing options...
wildteen88 Posted October 9, 2006 Share Posted October 9, 2006 There is no font-color optionUse color to set the color of the textANd no you cant set text to have two colors in the same class/id/element Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106270 Share on other sites More sharing options...
redarrow Posted October 9, 2006 Author Share Posted October 9, 2006 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. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106271 Share on other sites More sharing options...
redarrow Posted October 9, 2006 Author Share Posted October 9, 2006 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. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106275 Share on other sites More sharing options...
Daniel0 Posted October 9, 2006 Share Posted October 9, 2006 I believe that for colors there is a value option called transparent. You could use that for the color attribute. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106355 Share on other sites More sharing options...
redarrow Posted October 10, 2006 Author Share Posted October 10, 2006 can you give me an example of the code for transparent for the color property thank you. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106802 Share on other sites More sharing options...
wildteen88 Posted October 10, 2006 Share Posted October 10, 2006 I guess:[code]color: transparent[/code] Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106812 Share on other sites More sharing options...
redarrow Posted October 10, 2006 Author Share Posted October 10, 2006 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. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106821 Share on other sites More sharing options...
ToonMariner Posted October 10, 2006 Share Posted October 10, 2006 google 'tableless design' Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106828 Share on other sites More sharing options...
wildteen88 Posted October 10, 2006 Share Posted October 10, 2006 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. Link to comment https://forums.phpfreaks.com/topic/23431-is-it-possable-to-set-the-background-color-and-color-to-valadate-as-valadated/#findComment-106853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.