Hi,
i am designing a web page at present and i’m having trouble with my paragraph issue. When i add my paragraph text within my <div id=“content”> the background of it seems to drop down by 12px revealing the background color. This seems to happen when i add my <p> tag. Does anybody know why? and how i can overcome this please.
<body>
<div id="wrapper">
<div id="header">
<h1> SHANGHAI TRIP 2010 </h1>
</div>
<div id="navigation">
<ul>
<li><a href="default.php">Home</a></li>
<li><a href="shanghaizoo.php">Shangai Zoo</a></li>
<li><a href="chenghuangtmpl.php">Cheng Huang Temple</a></li>
</ul>
</div>
<div id="content">
<p>
Hi, welcome to my site, here you will be able to see a wide variety of holiday pictures taken while
I was in Shanghai 2010 during the Summer holidays. The site was done using a combination of PHP, HTML, CSS
and MySQL.
</p>
</div>
<div id="footer">
FOOTER
</div>
</div>
...
css:
body
{
background: #f3f2f3;
color: #000000;
font-family: Trebuchet MS, Arial, Times New Roman;
font-size: 12px;
}
#wrapper
{
background: #66FF99;
/* first value represents top/bottom, while second represents left/right margin */
margin: 60px auto;
width: 900px;
height: 1024px;
}
#header
{
background: #663300;
width: 900px;
height: 200px;
}
#navigation
{
background: #3366CC;
width: 900px;
height: 20px;
}
#navigation ul
{
list-style-type: none;
margin: 0;
padding: 0;
}
#navigation li
{
display: block;
float: left;
padding: 2px;
}
#content
{
background: #993300;
width: 900px;
height: 714px;
}
#footer
{
background: #0066CC;
height: 90px;
width: 900px;
}
I have a feeling that it might have something todo with my padding on my #navigation li
Thanks