Help - Search - Members - Calendar
Full Version: Layers (<div>...</div>)
Zymic Webmaster Forums > Web Design & Development > General Web Design Discussion
aussiemcgr
This is prob a simple mistake or I'm just going at it all wrong...
First of all, I prefer to use percentages oppose to pixels when measuring up stuff in html and it seemed to create some interesting problems when using layers.

Here is the test of what I'm starting to do (want to figure everything out before I do it for real): http://steelersfan.vndv.com/indextest.php

I'm using 3 layers (trying to keep it simple) and when you first go to the page everything looks fine. But as you scroll you'll notice that the backgrounds dont quite want to follow you.
I've set all the layers to 100% height which could be the problem in all this. Technically it is 100%, until you scroll down...

I am completely new to layers so I'm still learning this and that about them. Please help me out.
Sugarblossoms
Wow, that's the first time I saw more than 1 instance of <head></head> and <body></body>, but if it works for you, it's okay.

With your question, I think you forgot to include "background-repeat: repeat-y;" in your background image css style. I can't determined which background image it was since there is a right-click disabled script.
MrTouz
QUOTE(Sugarblossoms @ Aug 6 2008, 07:20 PM) *
Wow, that's the first time I saw more than 1 instance of <head></head> and <body></body>, but if it works for you, it's okay.

With your question, I think you forgot to include "background-repeat: repeat-y;" in your background image css style. I can't determined which background image it was since there is a right-click disabled script.

.
No its not Okay to have 2 head tags or 2 body tags... its not valid coding and its bad and its useless.
CODE
<html>
<head>
</head>
<body>

</body>
</html>


As for your error, well its simple, if you set a height for your background, here at 100% than your background is going to be the size of your screen (but nothing more) Meaning, if your screen is 1024x768 than your background is going to be 768(less than 768 since you have your start menu, the firefox interface...) so around 500px i say biggrin.gif

So basically, i suggest not seting a height but as stated above use a background-repeat:repeat-y; biggrin.gif

Good Luck
aussiemcgr
ok I do want to know, were did i use 2 head and body tags?

O wait nvr mind. The ones that are canceled out are just SSI that I nvr decided to remove. They arent actually doing anything to or against the code, just a bunch of gibberish basically.

Since I'm just testing things out on this particular document some of the code is just useless crap that will be cleaned up when I create the final product.

--------------------------------------------------------------------------------------------------------------------

Ok, i added the "background-repeat: repeat-y;" with no effect and I got rid of all the useless code to help you guys help me
MrTouz
Always get rid of useless codes.
k.digennaro
Are you using tables? I would suggest using <divs> and <div ids>. Makes the code for fluid, and the actual codes much easier to read.

An example:

CODE

<div id="head">
You're head content would go here.
</div>

on your CSS document or in your style section. you would have
CODE

#head{
height:;
width:;
padding:;
margin:;
}


That's just my personal preference. I'm not sure how many people are still using tables today.

-Kevin
Andrew
QUOTE(aussiemcgr @ Aug 6 2008, 03:54 PM) *
ok I do want to know, were did i use 2 head and body tags?

O wait nvr mind. The ones that are canceled out are just SSI that I nvr decided to remove. They arent actually doing anything to or against the code, just a bunch of gibberish basically.

Since I'm just testing things out on this particular document some of the code is just useless crap that will be cleaned up when I create the final product.

--------------------------------------------------------------------------------------------------------------------

Ok, i added the "background-repeat: repeat-y;" with no effect and I got rid of all the useless code to help you guys help me


You never followed Mr Touz advice.
In this part of your code
CODE
#titlelayer {
    position:absolute;
    left:5%;
    top:0%;
    width:90%;
    height:100%;
    z-index:1;
    background-color: #000000;
    background-repeat: repeat-y;
}
get rid of
CODE
    height:100%;
and it works perfectly.
aussiemcgr
QUOTE
You never followed Mr Touz advice.

Really at the moment, this is at the bottom of a LONG list of things I'm doing so I'm not reading as clearly as I should. Eitherway, i got rid of the %s and the middle layer (titlelayer) is fine but nothing is showing up in layers 1 and 2
Andrew
Maybe because layer one and two are empty?
CODE
<div id="Layer1"></div>
<div id="Layer2"></div>
</body>
</html>
aussiemcgr
QUOTE(Trippin7464 @ Aug 7 2008, 07:08 PM) *
Maybe because layer one and two are empty?
CODE
<div id="Layer1"></div>
<div id="Layer2"></div>
</body>
</html>


the images showed b4 i added "background-repeat: repeat-y;" but it didnt follow the whole page. layers 1 and 2 are just images
Andrew
Well I'm out of ideas, I don't use absolute positioning so I can't help you any further on this one.
wozzym
i have no idea, because you are using layers. maybe just compress it into one? unless your just trying to learn how to do it...
aussiemcgr
ill just mess around till things magically work. Thats what I usually do.
prixat
If you're still looking... I think I found the definitive solution for the ancient "equal height columns with only CSS" problem:

http://matthewjamestaylor.com/blog/holy-gr...-no-quirks-mode

No tables, no quirks mode, no javascript, no spacer gifs, no flash and totally cross browser biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.