Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am having a hard time with making a "div wrapper" code on my web page.

Here is what is in my HTML File
HTML
<!DOCTYPE html>
<title>
  <div id="wrapper">
	<h1>Sample h1 Heading</h1>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore  eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, in culpa qui officia deserunt mollit anim id est laborum</p>

<h2>Sample h2 Heading</h2>
<ul>
   <li>List item one</li>
   <li>List item two</li>
   <li>List item three</li>
</ul>

  <!—-End wrapper—->

And here is what is in my CSS file,
CSS
/* stylesheet.css */
/* Style rule for the body element */

body{
	background-color:white;
	background-image:url(pix/587e13b9482b2.jpg);
	background-repeat:no-repeat;
	/* Default font styling */
   	font: 10pt Arial, Helvetica, Sans-Serif;
   	color: #5d3f25;
		
}

/*Style rule for the wrapper div*/
#wrapper{
   	width:900px;
	margin:0 auto;	
	background-color:white;
	border:soild 2px #4c2e16;
	border-radius:20px;
	box-shadow:8px 8px 8px black;
}

/* Style for h1 headings */
h1{
   font:italic small-caps bold 24px Arial Black, Gadget, Sans-Serif;
   text-shadow:-2px -2px 2px #a48362;
   text-align:center;
}
/* Style for h2 headings */
h2{
   font:italic small-caps bold 18px Arial Black, Gadget, Sans-Serif;
   text-shadow:-1px -1px 1px #a48362;
}
/* Style for paragraphs */
p{
  line-height:1.5;
}
I can get everything else to work, i.e. the background, colors, fonts stuff like that, but I can't seem to get the white box background to work. If someone could help me, I would forever be thankful because I am at a loss on how to fix the problem.

This is also the link to the page,

file:///Users/taylargealy/Desktop/Intro%20HTML5/HTML5%20Template.htm


Thanks so much

What I have tried:

I have done everything I have learned, talked to different people, and watched videos on this problem and I can't seem to figure out what is the problem. I am on a Mac computer and have tried Safari and Firefox and nothing has worked. I have even started over with a new document and tried rewriting everything.
Posted
Updated 3-Sep-17 21:30pm
v2

1 solution

ah.... Did you close the div tag?(and the title tag)
 
Share this answer
 
v3
Comments
Member 13391855 4-Sep-17 13:33pm    
Yes, I closed it, for some reason it didn't show. You meant on my HTML file right?

<!DOCTYPE html>


<title>





<div id=“wrapper”>

Sample h1 Heading



Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, in culpa qui officia deserunt mollit anim id est laborum

Sample h2 Heading



List item one
List item two
List item three


<!—-End wrapper—->

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900