Jump to content

Problem with CSS tutorial: float, horizontal rule?


graceful1

Recommended Posts

Greetings.I am new to CSS. While going through the quick-start tutorial I encountered some problems that Ido not understand, so I turn to you for help. Basically, there are parts of the stylesheet that seemto have no effect.For example, in step 5, we are to add code for horizontal rule:

hr {	color:#b22222;	border:thin dotted	}

This had no effect when I requested the page with Firefox 2 and Safari 2 (on a Mac), although it did work with IE 6 (on a Windows box). However, the horizontal line does render correctly on the w3schools page no matter which browser I use.Likewise, the image float is broken.Here is a link to the page I built according to the tutorial instructions:myfirst_css.htmlAnd here is the link to the quick-start tutorial:quick-startThanks very much.Grace:)

Link to comment
Share on other sites

Strange. When I go to the tutorial and paste the code into my browser, it works as I expected it to, just like at the w3schools tutorial page. Yet your code, which 'appears' identical, doesn't float the img... I find this quite peculiar.

Link to comment
Share on other sites

Strange. When I go to the tutorial and paste the code into my browser, it works as I expected it to, just like at the w3schools tutorial page. Yet your code, which 'appears' identical, doesn't float the img... I find this quite peculiar.
Yes, I find this peculiar, too. Isn't there someone who can help me figure this out?I would be very grateful!Thanks,G.
Link to comment
Share on other sites

hr {	color:#b22222;	border:thin dotted	}

I'm not sure but maybe try it like what I have below. You also forgot the semicolon off the end there... that could be relevant, but I'm also pretty new to css ;p so don't take my word for it.

hr {color: #b22222; border: thin dotted;}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...