This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2013-03-28 10:50:20

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: Html4

veggieman001 wrote:

KrIsMa wrote:

veggieman001 wrote:


Actually, that should just be "h1" rather than ".h1", since it's the element rather than the class.

Really? My HTML book says that .h1 applies this style sheet to all h1 elements.

That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).

Hm.
It worked for me.


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#27 2013-03-28 12:22:04

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Html4

mythbusteranimator wrote:

veggieman001 wrote:

KrIsMa wrote:


Really? My HTML book says that .h1 applies this style sheet to all h1 elements.

That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).

Hm.
It worked for me.

I could not open the code o.o


http://blocks.scratchr.org/API.php?user=KrIsMa&action=onlineStatus&online=http://i49.tinypic.com/2pzic0m.png&offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#28 2013-03-28 13:38:31

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Html4

mythbusteranimator wrote:

veggieman001 wrote:

KrIsMa wrote:

Really? My HTML book says that .h1 applies this style sheet to all h1 elements.

That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).

Hm.
It worked for me.

Odd.

It wouldn't really make sense for it to work because h1 isn't a class in this case; it's the element name.


Posts: 20000 - Show all posts

Offline

 

#29 2013-03-28 13:39:56

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Html4

mythbusteranimator wrote:

veggieman001 wrote:

KrIsMa wrote:


Really? My HTML book says that .h1 applies this style sheet to all h1 elements.

That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).

Hm.
It worked for me.

You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#30 2013-03-28 15:52:05

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Html4

jvvg wrote:

mythbusteranimator wrote:

veggieman001 wrote:


That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).

Hm.
It worked for me.

You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".

THANK YOU SO MUCH! I WAS A BIT CONFUSED AND I THINK OTHER PEOPLE ARE TOO!

Btw,how do you make a ID style sheet that only works for a specific element, like H1?

#h1#someid{some CSS stuff}?  smile


http://blocks.scratchr.org/API.php?user=KrIsMa&action=onlineStatus&online=http://i49.tinypic.com/2pzic0m.png&offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

#31 2013-03-28 16:22:01

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Html4

KrIsMa wrote:

jvvg wrote:

mythbusteranimator wrote:

Hm.
It worked for me.

You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".

THANK YOU SO MUCH! I WAS A BIT CONFUSED AND I THINK OTHER PEOPLE ARE TOO!

Btw,how do you make a ID style sheet that only works for a specific element, like H1?

#h1#someid{some CSS stuff}?  smile

h1#specificid{
  etc:etc;
}
and then for a class it's
h1.specificclass{
  etc:etc;
}


Posts: 20000 - Show all posts

Offline

 

#32 2013-03-28 17:43:38

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: Html4

IDs and classes have a good way of being able to fit in almost anything.


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#33 2013-03-28 22:29:44

KrIsMa
Scratcher
Registered: 2011-09-20
Posts: 500+

Re: Html4

mythbusteranimator wrote:

IDs and classes have a good way of being able to fit in almost anything.

... and is very good at designing!


http://blocks.scratchr.org/API.php?user=KrIsMa&action=onlineStatus&online=http://i49.tinypic.com/2pzic0m.png&offline=http://i49.tinypic.com/r7p10n.png
The Scratch Team (and fellow scratchers!) is/are so nice!!!

Offline

 

Board footer