Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 05-15-2010, 03:49 AM using z-index
Ultra Talker

Posts: 254
Trades: 0
please look at this link
http://sudhakargolakaram.co.in/files/layout1.html

i have used 3 divs my question is about how div2 needs to be placed on top of div3

as of now it seems to work fine however i have used a negative z-index for the background div which has 100% width and has the repeating background.

i thought if i used position: relative for the wrapper div and used position: relative for div2 with a z-index of 2 and used position: relative for div3 with a lesser z-index of 1 which is less than z-index of div2

then the div3 would go behind div2


without using negative z-index for the background div is there any other way

please advice.

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-15-2010, 04:09 AM Re: using z-index
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Quick Q.

Why have you got a "div" for the background?

Just put your CSS for the background in your body?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 05-15-2010, 09:25 AM Re: using z-index
Ultra Talker

Posts: 254
Trades: 0
i have used a div for the background as this background image appears at the very bottom of the layout and the height of the content above it will vary based on a page and if i give the background image to the body this background image will not exactly coincide with the content at the footer as it is now
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 05-15-2010, 10:32 AM Re: using z-index
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You don't need to use positioning and z-index to achieve that layout at all. You can put one background on <body> as mentioned above. You can add a "container" div that's 100% width (by default) with the 2nd background on it. Then your #wrapper sits on top of that - no positioning or z-indexing needed at all. The position:relative on your #wrapper is good practice though, should you need to position something inside it later.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to using z-index
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.63418 seconds with 12 queries