Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
Chris Snell #1
Layer Sizing
Hi
Ive been using dreamweaver for a while and just recently started to use layers.
I think what im trying to do is simple enough, but just cant get it to do what
i want.
basically if i create 3 layers
header
main content
footer
header is 100% wide by 115px positioned at top 0px
footer is 100% wide by 25px positioned at bottom 0px
what i want to be able to do is make the "main content" window fill the gap in
between regardless of the browser window size.
ive tried using the top and bottom properies but unlike setting width
properties i dont seem able to set a top position of
115px so it sits under the header, and then specify a bottom property to 25px
so it finshes just above the footer. It only seems to want to take notice of 1
or other of the properties.
can anyone tell me how to do this.
Thanks
All help much apreciated.
:confused;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#Layer1 {
position:absolute;
width:100%;
height:115px;
z-index:1;
left: 0px;
}
#Layer2 {
position:absolute;
width:100%;
height:25px;
z-index:2;
left: 0px;
bottom: 0px;
}
#Layer3 {
position:absolute;
width:200px;
z-index:3;
left: 0px;
bottom: 25px;
overflow: scroll;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="Layer1">top</div>
<div id="Layer2">bottom</div>
<div id="Layer3">
<p>left</p>
</div>
</body>
</html>
Chris Snell Guest
-
activeX axShockwave.loadMovie(Layer, url) ... what is layer for ?
Hi All, I am working with the shockwave activeX controll loading flash movies into my c# applications. ( I am using falsh mx 2004 Pro) The movies... -
Flash layer on top of normal HTML layer
I am using z-index to put a flash advertisement with a transparent background at the utmost top layer of my webpage. Since I want it to move... -
PE2: Selecting and painting a layer having a Hidden Power Tools' layer mask?
I am making a collage using PE2. I have a background layer (solid color) and then each photo is on its own layer with a layer mask used from the... -
Div Layer positioning and sizing
Hi. I'm currently experiencing a rather weird behavior of Dreamweaver MX. When resizing or moving a DIV-Layer, the values will be set to something... -
on Director : 3D layer + flash (SWF) layer (or with other layer type)
Thankx for all it's works :) Coool -
Murray *ACE* #2
Re: Layer Sizing
Here's a sincere suggestion. Take a break from using layers. They will get
you into trouble if you are not well prepared for them. Read this page -
[url]http://www.great-web-sights.com/g_layerlaws.asp[/url]
This shows me that you are headed down the slippery slope already. Using> basically if i create 3 layers
> header
> main content
> footer
layers as a primary layout method is definitely not a best practice. If you
don't want to use tables, then you need to study CSS methods and focus on
block vs inline tags, normal flow of code, and how floats work....
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"Chris Snell" <webforumsuser@macromedia.com> wrote in message
news:ek1p7e$qug$1@forums.macromedia.com...> Hi
>
> Ive been using dreamweaver for a while and just recently started to use
> layers.
> I think what im trying to do is simple enough, but just cant get it to do
> what
> i want.
>
> basically if i create 3 layers
> header
> main content
> footer
>
> header is 100% wide by 115px positioned at top 0px
> footer is 100% wide by 25px positioned at bottom 0px
>
> what i want to be able to do is make the "main content" window fill the
> gap in
> between regardless of the browser window size.
> ive tried using the top and bottom properies but unlike setting width
> properties i dont seem able to set a top position of
> 115px so it sits under the header, and then specify a bottom property to
> 25px
> so it finshes just above the footer. It only seems to want to take notice
> of 1
> or other of the properties.
>
> can anyone tell me how to do this.
>
> Thanks
> All help much apreciated.
> :confused;
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>Untitled Document</title>
> <style type="text/css">
> <!--
> body {
> margin-left: 0px;
> margin-top: 0px;
> margin-right: 0px;
> margin-bottom: 0px;
> }
> #Layer1 {
> position:absolute;
> width:100%;
> height:115px;
> z-index:1;
> left: 0px;
> }
> #Layer2 {
> position:absolute;
> width:100%;
> height:25px;
> z-index:2;
> left: 0px;
> bottom: 0px;
> }
> #Layer3 {
> position:absolute;
> width:200px;
> z-index:3;
> left: 0px;
> bottom: 25px;
> overflow: scroll;
> }
> -->
> </style>
> <script type="text/javascript">
> <!--
> function MM_reloadPage(init) { //reloads the window if Nav4 resized
> if (init==true) with (navigator) {if
> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);
> //-->
> </script>
> </head>
>
> <body>
> <div id="Layer1">top</div>
> <div id="Layer2">bottom</div>
> <div id="Layer3">
> <p>left</p>
> </div>
> </body>
> </html>
>
Murray *ACE* Guest



Reply With Quote

