PDA

View Full Version : Cant seem to view my layers in web browser...


stag
01-09-2007, 11:19 PM
I have constructed layers on my page but only one shows up when I view thru firefox and IE. Any ideas why this is?

Cheers

davidj
01-09-2007, 11:23 PM
you need to post the code or a link

err its ok ill use this...

stag
01-09-2007, 11:28 PM
hehe, of course... Be warned im new so be kind :)

}
#Layer1 {
position:absolute;
width:312px;
height:441px;
z-index:1;
left: 172px;
top: 177px;
background-color: #FFFFFF;
}
#Layer2 {
position:absolute;
width:480;
height:441;
z-index:2;
left: 497;
top: 177;
}
#Layer3 {
position:absolute;
width:480;
height:441;
z-index:2;
left: 497;
top: 177;
background-color: #FFFFFF;
}
#Layer4 {
position:absolute;
width:104;
height:22;
z-index:3;
left: 57;
top: 177;
background-color: #FFFFFF;
}
#Layer5 {
position:absolute;
width:104;
height:22px;
z-index:4;
left: 57;
top: 207;
background-color: #FFFFFF;
}
#Layer6 {
position:absolute;
width:104;
height:22;
z-index:5;
left: 57;
top: 237;
background-color: #FFFFFF;
}
#Layer7 {
position:absolute;
width:104;
height:22;
z-index:6;
left: 57px;
top: 322px;
background-color: #FFFFFF;
}
#Layer8 {
position:absolute;
width:104;
height:22;
z-index:7;
left: 57px;
top: 353px;
background-color: #FFFFFF;
}
#Layer9 {
position:absolute;
width:104;
height:234px;
z-index:8;
left: 57;
top: 384;
background-color: #FFFFFF;
}
-->
</style></head>

<body>
<div id="Layer1">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div id="Layer3"></div>
<div id="Layer4"></div>
<div id="Layer5"></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="Layer6"></div>
<div id="Layer7"></div>
<div id="Layer8"></div>
<div id="Layer9"></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>


</html>

davidj
01-09-2007, 11:34 PM
hehe no worries stag

just kiddin wid ya

stag
01-09-2007, 11:36 PM
Anything wrong in your eyes with this?

davidj
01-09-2007, 11:39 PM
all your layers have the same bg colour of white which is probably on a white bg which will make them appear invisible

stag
01-09-2007, 11:44 PM
No, they are aganist a background image...

davidj
01-10-2007, 12:08 AM
ahh i can see it now

i couldnt see the wood for the trees


you need a type (px) after your height and width values in your css

width:480px;
height:441px;

stag
01-10-2007, 12:44 AM
super super thx!!!
Ok, now on something else :) I want layer2 to be a scroll bar for text, but I assume I have been inputting the code incorrectly. Is it correct to turn the layer into a scroll and how exactly? Do you have to write code or is the a function in DM?

Cheers

stag
01-10-2007, 12:47 AM
Oh and is it better to place an image into a layer, table or nest it:)

chriskq
01-10-2007, 12:58 AM
if u have a height set on the layer that u want text to be scrollable you will need to add this overflow: auto;

this means that when any text that goes over ur specified height, the scrollbar will appear.

is it better to place an image into a layer, table or nest it


always depends... but the standard <img> tag code would be fine. Unless u want text to appear on top of the image, then it should be a background image on the table or div..

stag
01-10-2007, 01:15 AM
Thx - where abouts within the layer code should I place this or does it not matter? So, if this is correctly placed, instead of the layer expanding when new text is added, in dreamweaver a scroll bar will appear or is this only in the browser?

domedia
01-10-2007, 01:25 AM
Thx - where abouts within the layer code should I place this or does it not matter? Anywhere is fine, as long as it's inside the CSS declaration of the selector.
So, if this is correctly placed, instead of the layer expanding when new text is added, in dreamweaver a scroll bar will appear or is this only in the browser? It might or might not work in DW, but you should really ignore that. Noone is going to view your website through Dreamweaver, only browser rendering matters.

stag
01-10-2007, 01:29 AM
And as for the image, no text, but want to place it in the correct place on the page so I went for layering. Would it be wiser to background image this? Seems ok, but dont want unecessary code...

chriskq
01-10-2007, 01:43 AM
yep standard image code will be fine then

<img src="common/images/" alt=" " title="" />


remember, you can still have a table inside your layer for positioning the content and images

stag
01-10-2007, 01:56 AM
Hurahhh, works a treat!!! I will almost defo be back on here tomorrow for more questions. Actually, while im at it, my other layer

}
#Layer3 {
position:absolute;
width:480px;
height:441px;
z-index:2;
left: 497px;
top: 177px;
background-color: #FFFFFF;

...will be used to host picture images. Images are slightly smaller so to create a border for images, so I guess which methods i should be using to place this within? Also, not sure whether to use thumbnails or click arrows, if fact, im not quite sure how to really go about it. Any resources you can point me to or your own?

questions questions... But you have both been a great help and highly appreicated :)