Jump to content

I need help..my p in my div isn’t showing up..


laceew45

Recommended Posts

Here is the coding: 

<style>
body {
	background-color: black;
	color: white;
}
#content {
	overflow: hidden;
	width: 300px;
	height: 200px;
	margin-left: 300px;
	margin-top: 200px;
}
.page {
	overflow: auto;
	width: 300px;
	height: 200px;
	margin-left: 300px;
	margin-top: 200px;
}
h1 {
	margin-left: 300px;
	margin-top: 100px;
	font-size: 100px;
}
p {
	color: white;
}
</style>
<body>
<img src="//images.weserv.nl/?url=http://i66.tinypic.com/erbvys.jpg" style="position: absolute;">
<h1>Hermonie Granger</h1>

<div id="content">

<div class="page">
<p>Boo ya!</p>
</div>



















</div>
</body>

Yet, When I go to view it, the content doesn’t show up. Just my heading. I have NEVER had this problem before and I have gone over my coding. I am not sure what’s going on and I am pulling out my hair trying to figure it out.

This post has been edited by a member of staff (.Brianna.) because of a violation of the forum rules.
Please don't double post. If your post is the most recent reply and you would like to add something, use the 'Edit' button.
Please check your user inbox to see if you have been contacted regarding this incident, then review our rules.

Link to comment
Share on other sites

You probably don't need to have the color: white; code in your body tag. Also I don't think color: white; in your p tags is the proper way of putting it. If you want your font to be that color then you need the proper code for font. Which I believe is font-color: white;

 

Hope this helps.

Link to comment
Share on other sites

Definitely not an expert, but looking at your code I think your "div" tags should be grouped, or rather, look like this:

 

<body>
<img src="http://i66.tinypic.com/erbvys.jpg" style="position: absolute;">
 

<h1>Hermonie Granger</h1>

 

<div id="content";class="page">

 

<p>Boo ya!</p>

 

</div>

</body>

 

Doing that, "Boo ya!" does appear, in white, on the page using the WC3 Schools "Tryit" editor at: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_default. It may not be in the place you want it, but it does appear, if that is what you are trying to do.

 

EDIT: If you change the code to this, then it changes the "Boo ya!" to be "in-line" with your "h1" text, but lower:

 

<div id="content"></div>

<div class="page">

 

<p>Boo ya!</p>

 

</div>

Link to comment
Share on other sites

You probably don't need to have the color: white; code in your body tag. Also I don't think color: white; in your p tags is the proper way of putting it. If you want your font to be that color then you need the proper code for font. Which I believe is font-color: white;

 

Hope this helps.

^ font-color doesn’t work. I have always used “color: white” or whatever the color I am using. the color: white in my body tag is to make all my writing white since it’s on a black background. I only did the p tag because I thought it was messing up somehow but it usually works too. 

 

Definitely not an expert, but looking at your code I think your "div" tags should be grouped, or rather, look like this:

 

<body>

<img src="http://i66.tinypic.com/erbvys.jpg" style="position: absolute;">

 

<h1>Hermonie Granger</h1>

 

<div id="content";class="page">

 

<p>Boo ya!</p>

 

</div>

</body>

 

Doing that, "Boo ya!" does appear, in white, on the page using the WC3 Schools "Tryit" editor at: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_default. It may not be in the place you want it, but it does appear, if that is what you are trying to do.

 

EDIT: If you change the code to this, then it changes the "Boo ya!" to be "in-line" with your "h1" text, but lower:

 

<div id="content"></div>

<div class="page">

 

<p>Boo ya!</p>

 

</div>

^ I want the boo ya to be hidden so the content has to be a div with the page inside it. It’s an anchored layout. 

 

 

I FIGURED IT OUT! THIS TOPIC CAN BE CLOSED! :)

 

This topic has been edited by a member of staff (Spritzie).

The original topic is now answered and will be closed.

Please check your user inbox to see if you have been contacted regarding this topic.

Per the reason above, this topic has been LOCKED. Please contact Spritzie if you have any questions regarding this action.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...