Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-06-2005, 08:31 PM   PM User | #1
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Unhappy Layout Trouble - Layers

Okay, I am attempting to make my first-ever layout, (all by myself!! I'm so proud.) but, seeing as this is my first real attempt, I've run into some problems. My latest seems pretty simple, yet I can't seem to find a solution...

The page in progress is here.

Currently I have made divs as a css layout for my content, and have a fixed background.

The problem: I would like it if my content didn't go over the top part of the background; the moon and the brushes/text I plan to add. Now I don't know anything about images and stuff, but my first thought was to cut the image, and make the top part on another layer, so it's not part of the background anymore, and the layers I already have will scroll under it, and not over. But in the css layout I'm using, apparently all layers are on the same... what would I call it, plane?

I don't know if I'm at all on the right track with this, so I'd appreciate your thoughts and suggestions. Thanks.
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 08:34 PM   PM User | #2
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
By the way, if you posted on my thread last night, you'll see that I finally managed the opacity/transparency problem. Thanks for the help.
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 09:42 PM   PM User | #3
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
Quote:
Now I don't know anything about images and stuff, but my first thought was to cut the image, and make the top part on another layer, so it's not part of the background anymore, and the layers I already have will scroll under it, and not over. But in the css layout I'm using, apparently all layers are on the same... what would I call it, plane?
That's one way to try it. First, you could move the divs holding your content down a little bit using "top" since they're absolutely positioned:
Code:
#menu, #content {
   top: 100px;
   }
And then you could place an image on the top of the screen using position:fixed, z-index, and slightly overlapping the content. I don't know if this is the way I would do it if I was coding this from scratch, but I think it could work for you.

Hope this helps...
__________________
drums | web

Last edited by rmedek; 08-06-2005 at 09:45 PM..
rmedek is offline   Reply With Quote
Old 08-06-2005, 09:45 PM   PM User | #4
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Thanks, I'll try that.
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 09:49 PM   PM User | #5
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Oh yes, thank you! The z-index was exactly what I was looking for, I'd completely forgotten about it. This should work, I think...
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 10:07 PM   PM User | #6
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
The z-index seems to be working, but... The image is still moving when I scroll, I guess because it is still part of my body... how do I fix that?
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 10:17 PM   PM User | #7
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
Fixed for me... you're using -

bgproperties="fixed"

But really you should use CSS -

body { background: url(images/background1.jpg) fixed }
__________________
markaylward.co.uk
mark87 is offline   Reply With Quote
Old 08-06-2005, 10:19 PM   PM User | #8
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Yeah, I was just about to do that. I don't think it'll make my image stay put, though. Can I absolute position an image in my css...? (I REALLY need to catch up on this stuff again... -sweatdrop-)
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 10:42 PM   PM User | #9
mark87
Senior Coder

 
Join Date: Dec 2004
Location: Essex, UK
Posts: 2,636
Thanks: 0
Thanked 0 Times in 0 Posts
mark87 is on a distinguished road
That will make the background image stay put...
__________________
markaylward.co.uk
mark87 is offline   Reply With Quote
Old 08-06-2005, 10:45 PM   PM User | #10
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Lol yes, sorry, I haven't had problems with that, but the other image won't stay put... Well there isn't one on the page I've linked to, I haven't overwritten it yet, but I'd like my content to scroll under the top part, and the easiest way to do that seems to be to place an image at the top that would be stacked above the others using z-index, but I can't seem to get the image I want to use to stay put; since it's part of the body, it wants to scroll with it...
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 10:50 PM   PM User | #11
krazykikikatt
New Coder

 
Join Date: Aug 2005
Location: Nanuet, New York
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
krazykikikatt is an unknown quantity at this point
Here's an idea... could I, in fact, instead of just having a fixed background, divide the background up into several images and position them with z-index... So that the parts that I want to still be the background would be behind my content still.. and the one image that I want the content to scroll under would be stacked correspondingly..?
__________________
I want patience, and I want it now!
krazykikikatt is offline   Reply With Quote
Old 08-06-2005, 11:46 PM   PM User | #12
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
Quote:
Originally Posted by krazykikikatt
Here's an idea... could I, in fact, instead of just having a fixed background, divide the background up into several images and position them with z-index... So that the parts that I want to still be the background would be behind my content still.. and the one image that I want the content to scroll under would be stacked correspondingly..?
I dunno... it's an idea but there seems like there should be a simpler way. I'll see if I can drum up an example for you.

BTW... keep in mind that Internet Explorer chokes on fixed positioning, so without lots of extra markup it's not going to be pretty.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 08-07-2005, 12:10 AM   PM User | #13
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
Here... see if this give you any ideas:

http://richardmedek.com/temp/example17.htm

Works (so far) in all standards-compliant browsers. Hope this helps, or at least gives you an idea or two.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 08-07-2005, 12:14 AM   PM User | #14
kiwibrit
New Coder

 
Join Date: Jun 2005
Posts: 40
Thanks: 0
Thanked 2 Times in 2 Posts
kiwibrit is an unknown quantity at this point
Quote:
Originally Posted by rmedek
.........BTW... keep in mind that Internet Explorer chokes on fixed positioning, so without lots of extra markup it's not going to be pretty.
Care to expand on that? I've used fixed positioning here and there. Seems OK in IE.
kiwibrit is offline   Reply With Quote
Old 08-07-2005, 12:20 AM   PM User | #15
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
Quote:
Originally Posted by kiwibrit
Care to expand on that? I've used fixed positioning here and there. Seems OK in IE.
Are you sure? Try this in Firefox or Opera, and you'll see what it's supposed to do. I am using IE on a Virtual PC, so maybe I'm mistaken, but I thought IE6 didn't support fixed positioning.
__________________
drums | web
rmedek is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:46 AM.


Advertisement
Log in to turn off these ads.