Forum Moderators: not2easy
>>>I'm trying to add the <div id="box"> to the code so that i can have a foreground(not sure if this is the right word.) so my text will be placed over this.<<<*******
Q.1. So, in the CSS i have height: 500px;. My question is if i am going to have this on *ALL* pages of my site, and all pages have different amounts of text, do i just *NOT* add the
height:
in the css so all my pages text will be in the box and end exactly at the </div>?
>>(Meaning that all the text will be in the <div></div> *box* no matter how long the page article is and end on </div>.
>>I would like to have it end exactly at the end of each </div> and not specify the height.<<
Here's the css for the <div id="box">
#box { height: 500px;
background-color: #002868; border-bottom: 1px solid #FFFFFF; border-top: 1px solid #FFFFFF; }
And the HTML for the page.>>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1 transitional.dtd">
<html>
<head>
<title>
consol
</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="xyz.css" />
<link rel="stylesheet" type="text/css" href=abc.css" />
<link rel="stylesheet" type="text/css" href="box.css" />
</head>
<body>
<img src="logo.jpg" width="759" height="23" alt="" />
<div id="abc">
xyz
</div>
<img src="7.jpg" width="759" height="23" alt="" />
<img src="7.jpg" width="759" height="23" alt="" />
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" width="100">
<div id="xyz">
<ul>
<li>
<a href="index.html">Home</a>
</li>
<li>
<a href="score.html">Info</a>
</li>
<li>
<a href="score.html">Order</a>
</li>
<li>
<a href="score.html"> consolidation </a>
</li>
</ul>
</div>
</td>
<td width="575">
<div id="box">
<h1>
consol
</h1>
<p>
blah blah blah...
</p>
</div>
</td>
</tr>
</table>
</body>
</html>
Thanks for your help guys:)
frenzy77
A couple of things, why do you have three stylesheets? What is the table for?
I think you are saying that you want the div to end when the content does, so that there is no white space below the content?
If that is the case, then do not specify a height.
I merely want the text to stay within the <div></div> *box* no matter how long the page article is and end on </div>.
>>I would like to have it end exactly at the end of each </div> and not specify the height.<<
Like this:
<html>
etc...
<body>
etc...
<div id="box">
text goes here
</div>
</body>
</html>
*All the text will then be within the box for each page i place the <div id="box"> and the box highlight will end exactly under the last sentence no matter how long the article spans.
So if i have an article height 500px on one page and another one on another page the height of 1000px they will always be ending under the last sentence of the last paragraph.(within the box)
Q.1. So, can i *not* specify height: in the css and it will do this for all my pages with
<div id="box">?
Thanks for your help abbeyvet:)
Hope to here from you soon.
frenzy77
I'm useing the div purely for design purposes as i don't know enough CSS to design a great layout with rounded corners or other design aspects. So this div
is a green foreground for the content.
It does work and is validated as xhtml 1.0
Well, thanks again tedster:)
frenzy77