Jump to content


Photo

css short hand(not working)


  • Please log in to reply
4 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 24 October 2006 - 04:52 PM

I finally started tryign to get into shorthand and have a bad experience with it first thing.
I tried turning this
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;
}
into
h1 h2 h3 h4 h5 h6 {
color: #000000;
background-color: #f2faf5;
}
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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 24 October 2006 - 05:01 PM

You have to have commas separating your tags in your selector if you are wanting to select separate tags:
h1, h2, h3, h4, h5, h6 {
  color: #000000;
  background-color: #f2faf5;
}

You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 24 October 2006 - 06:17 PM

thanks.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 jcombs_31

jcombs_31
  • Staff Alumni
  • Advanced Member
  • 2,066 posts
  • LocationFL

Posted 31 October 2006 - 12:55 AM

why would you want every header to be the same?  Defeats the purpose.

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 31 October 2006 - 01:29 PM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users