• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 104
  • Last Modified:

Trying to design a box

Why does this not work.
No borders show
no background shows
Why does this not work ?
  • 3
2 Solutions
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:

<!DOCTYPE html>

<html lang="en">
    <meta charset="utf-8">
	<style type= "text/css">	
	 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;
 <div id="pitchbox" class=pitchbox>
  Roof pitch

Open in new window

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)
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Dave, did you submit twice is or is that a glitch.  2nd time I saw this today.
Dave BaldwinFixer 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.
isnoend2001Author Commented:
Should have know that
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.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now