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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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] Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 10, 2006 Share Posted October 10, 2006 I guess:[code]color: transparent[/code] Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted October 10, 2006 Share Posted October 10, 2006 google 'tableless design' Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.