Ninjakreborn Posted October 24, 2006 Share Posted October 24, 2006 I finally started tryign to get into shorthand and have a bad experience with it first thing.I tried turning this [code]h1 {font-size:1.5em;background-color:#f2faf5;color:#000000;}h2 {color:#000000;font-size:1.3em;background-color:#f2faf5;}h3 {color:#000000;font-size:1.2em;background-color:#f2faf5;}h4 {color:#000000;background-color:#f2faf5;font-size:1.1em;}h5 {color:#000000;background-color:#f2faf5;font-size:1em;}h6 {color:#000000;background-color:#f2faf5;font-size:0.8em;}[/code]into[code]h1 h2 h3 h4 h5 h6 {color: #000000;background-color: #f2faf5;}[/code]The problem nwo though is, with the long drawn out style's it put's a background color with all of them, with this it doesn't put a background color with any of them. Link to comment https://forums.phpfreaks.com/topic/24946-css-short-handnot-working/ Share on other sites More sharing options...
obsidian Posted October 24, 2006 Share Posted October 24, 2006 You have to have commas separating your tags in your selector if you are wanting to select [i]separate[/i] tags:[code]h1, h2, h3, h4, h5, h6 { color: #000000; background-color: #f2faf5;}[/code] Link to comment https://forums.phpfreaks.com/topic/24946-css-short-handnot-working/#findComment-113711 Share on other sites More sharing options...
Ninjakreborn Posted October 24, 2006 Author Share Posted October 24, 2006 thanks. Link to comment https://forums.phpfreaks.com/topic/24946-css-short-handnot-working/#findComment-113742 Share on other sites More sharing options...
jcombs_31 Posted October 31, 2006 Share Posted October 31, 2006 why would you want every header to be the same? Defeats the purpose. Link to comment https://forums.phpfreaks.com/topic/24946-css-short-handnot-working/#findComment-117072 Share on other sites More sharing options...
Ninjakreborn Posted October 31, 2006 Author Share Posted October 31, 2006 I don't. I was just learning shorthand. I have been reading a few more book's on css to try and get better and better and it's helping even more. Link to comment https://forums.phpfreaks.com/topic/24946-css-short-handnot-working/#findComment-117258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.