help with DIV tags

liunx

Guest
<center><br />
<div id="Layer1" style="position:relative; left:50px; right:50px; top:162px; height:76px; z-index:1; background-color: #FFFFFF;"></div><br />
</center><br />
<br />
<br />
that is what i have, <br />
(see attached)<br />
<br />
<br />
this is what i am trying to do, , i am making this layer span the whole page, and i want it to be indented on both sides, right and left, 50px each. so that there is 50 pixels on each side of the layer before the page hits the browser. <br />
as you can see it indents fine on the left but i cant get the right side to do it as well.. any halp is greatly appreciated, if it were a matter of pixels it would be easy but most of the site is scaled in percentages :(<!--content-->There is no such atribute as right:<br />
<br />
Try<div id="Layer1" style="position:relative;top:162px; height:76px;width:100%;margin-left:50px;margin-right;50px; z-index:1; background-color: #FFFFFF;"></div><br />
<br />
Should work in IE but I'm not sure about Netscrap<!--content-->Just what does the div tag do?<br />
tx.<!--content-->According to my big HTML book, the <DIV> element "specifies a container that renders HTML"<br />
Hope this helps. :)<br />
<br />
Seriously though, the <DIV> element is used to logically divide a page. It creates a virtual section. For example:<br />
<br />
<div style="color: red" id="birds"><br />
<h1>Eagle</h1>......<br />
<h1>Albatross</h1>......<br />
<h1>Sparrow</h1>......<br />
</div><br />
<div style="color: blue" id="rodents"><br />
<h1>Rat</h1>......<br />
<h1>Mouse</h1>......<br />
<h1>Bat</h1>......<br />
</div><br />
<br />
<br />
The <div> element is very much like the <span> element, except that the <div> element is a block element, and <span> is inline. Span lets you do stuff like:<br />
We all live in a <span style="color: yellow; font-style: italic; font-family: arial" onmouseover="alert('yellow')">yellow</span> submarine.<!--content--><DIV> "offers a generic method of adding structure to documents".<br />
It was also designed to address limitations of HTML3.2 by providing enhancements to frames, tables and forms.<br />
Also provides additional capabilities to webmasters by extending HTML4 to allow use of scripts, styles and objects.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.wdvl.com/Authoring/HTML/4/Tags/div.html<br />
<br />
How does DIV differ from SPAN? DIV is used for block-level elements while SPAN defines content to be inline.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.w3.org/TR/REC-html40/struct/global.html#edef-DIV<!--content-->One more definition:<br />
<br />
The DIV element is a generic, catch-all Block Formatting element with an implied line break before and after. Within the realm of Style Sheets, this element is nestable to allow hierarchies of sections, subsections or chapters to be defined. This nesting ability also allows for powerful Style Sheet mechanisms to be applied. <br />
<br />
SCR: <!-- w --><a class="postlink" href="http://www.blooberry.com">www.blooberry.com</a><!-- w --><!--content-->Watermarks and things.<!--content-->Gosh, I thought I was getting a lot better at this HTML but<br />
I guess I have a ways to go...I'm confused! I think I get the general idea, but am not quite sure. I have the div tag on my web pages - made by someone who knows what he's doing, and I could never figure out just what they were/are for. There isn't anything added to the div tags though. <br />
Well, I do thank you all for the help - I do sort of get the idea. I bookmarked those links so I can sit down and really read about it - that should help. I hope. If not I'm helpless! :0<!--content-->I ahve a post here in the site:<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=8580">http://www.htmlforums.com/showthread.ph ... eadid=8580</a><!-- m --><br />
<br />
where I'm trying to use DIV tags and my be doing something wronge or just completly off the wall, can someone take a look?<!--content-->
 
Back
Top