rutledj
11-27-2006, 09:30 AM
I have the following on a page and my question is why don't the div's (ad and mission) appear in the page side-by-side instead of ad on top, mission on bottom? There is enough room on the page for them to be side-by-side.
I added colors to the borders and it appears that each div occupies the entire horizontal width even though the actual content is about 1/3 the width of the page.
I guess I assumed that one div would follow the next if no positioning was indicated in the style sheet.
Thanks,
Rut
<head runat="server">
<link href="boxstyle.css" rel="stylesheet" type="text/css" />
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div id="wapper">
<div id="ad">
<img src="climbingwall.JPG" />
</div>
<div id="mission">
<h2>Welcome</h2>
Reidsville Christian Church exists to share <br />
the good news of Jesus with people everywhere,<br />
to teach and strengthen the believers, to<br />
minister to the needs of others, and to be<br />
a Christian influence in the community.
</div>
</div>
</form>
</body>
Style sheet:
body {
}
* {
margin:0;
padding:0;
}
#ad
{
border-right: fuchsia thick solid;
border-top: fuchsia thick solid;
border-left: fuchsia thick solid;
border-bottom: fuchsia thick solid;
}
#wapper
{
border-left-color: blue;
border-bottom-color: blue;
border-top-style: dotted;
border-top-color: blue;
border-right-style: dotted;
border-left-style: dotted;
border-right-color: blue;
border-bottom-style: dotted;
}
#mission
{
border-right: red dashed;
border-top: red dashed;
border-left: red dashed;
border-bottom: red dashed;
}
I added colors to the borders and it appears that each div occupies the entire horizontal width even though the actual content is about 1/3 the width of the page.
I guess I assumed that one div would follow the next if no positioning was indicated in the style sheet.
Thanks,
Rut
<head runat="server">
<link href="boxstyle.css" rel="stylesheet" type="text/css" />
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div id="wapper">
<div id="ad">
<img src="climbingwall.JPG" />
</div>
<div id="mission">
<h2>Welcome</h2>
Reidsville Christian Church exists to share <br />
the good news of Jesus with people everywhere,<br />
to teach and strengthen the believers, to<br />
minister to the needs of others, and to be<br />
a Christian influence in the community.
</div>
</div>
</form>
</body>
Style sheet:
body {
}
* {
margin:0;
padding:0;
}
#ad
{
border-right: fuchsia thick solid;
border-top: fuchsia thick solid;
border-left: fuchsia thick solid;
border-bottom: fuchsia thick solid;
}
#wapper
{
border-left-color: blue;
border-bottom-color: blue;
border-top-style: dotted;
border-top-color: blue;
border-right-style: dotted;
border-left-style: dotted;
border-right-color: blue;
border-bottom-style: dotted;
}
#mission
{
border-right: red dashed;
border-top: red dashed;
border-left: red dashed;
border-bottom: red dashed;
}