Trying to design a box

Why does this not work.
No borders show
no background shows
http://real20cardkeno.com/test.asp
Why does this not work ?
isnoend2001Asked:
Who is Participating?
 
Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
Try

<!DOCTYPE html>

<html lang="en">
  <head>
  <title>test</title>
    <meta charset="utf-8">
	<style type= "text/css">	
	
	.pitchbox{	 
	 border: 1px solid #0066ff;
	width: 160px;
	height: 720px;
 padding-left: 5px; 
 padding-right: 5px;  
 padding-top: 2px;
  padding-bottom: 3px;
  background-color: rgb(227,227,227);
  text-align: center;
   }             
	
	</style>
  </head>
 
  <body>
 <div id="pitchbox" class=pitchbox>
  Roof pitch
  </div>
  </body>
</html>

Open in new window

0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Ooops that  should be  <div id="pitchbox" class="pitchbox">

Try and do your design using the class and not the id.  You simply set your css to a class by using a . instead of # (for id)
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Dave, did you submit twice is or is that a glitch.  2nd time I saw this today.
0
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
Because '.pitchbox' is a class and you put id="pitchbox" in the div.  They need to both be the same kind.  Both class or both id.
0
 
isnoend2001Author Commented:
Thanks
Should have know that
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.