- This topic is empty.
-
AuthorPosts
-
November 24, 2012 at 10:51 am #40966
Rohithzr
ParticipantI want to place 1 div on another ………. [like div1 on top of div2] is i possible?
November 24, 2012 at 10:54 am #115323pmac627
ParticipantLike, overlaying (think two pieces of paper stacked on top of each other? Or two over each other like below?
X
XNovember 24, 2012 at 11:02 am #115324Rohithzr
Participanton top of each other……..
November 24, 2012 at 11:03 am #115325Rohithzr
Participantlike two divs having same coordinates
November 24, 2012 at 11:34 am #115328pmac627
ParticipantThere are a bunch of ways to do it. There are some better than this, but this works:
http://codepen.io/Pmac627/pen/GshgA
I have them not completely overlaying to show that there are two elements there. Just adjust the left and top values
November 24, 2012 at 11:35 am #115329pmac627
ParticipantIts very possible. If you want faster replies, google the question. You can find dozens of possible solutions to the multiple questions you’ve asked on these forums over the last hour.
November 24, 2012 at 1:59 pm #115327Paulie_D
MemberThe more important question is WHY you want to do this?
From previous posts of the OP it seems like s/he hasn’t really gotten to grips with the basics as yet.
November 25, 2012 at 2:13 am #115386Rohithzr
Participanti am an amateur of course…………. actually i am learning css widout books, tutorials etc.. i dont hav access to them ..nor internet (except today) so just want to clear a few doubts as i hav a net connection today….
November 25, 2012 at 4:04 am #115402jwebcat
Memberlearn about z-index and position. Google them one at a time.
November 25, 2012 at 4:06 am #115403jwebcat
Memberdiv1 {
position: relative;
z-index:1
}
div2 {
position:relative;
z-index:2
}the highest z-index is on the top. You have to have a position declared for it to work.
November 25, 2012 at 4:07 am #115404Paulie_D
MemberAs I said, we’d need to know WHY this is to be done.
What effect are you trying to achieve?
You said, elsewehere
>i am new at css and know all the shadowing, rotating etc
I suspect you might have been overstating your skills here plus there seems to be a contraction inherent in that statement.
November 25, 2012 at 5:05 am #115417Rohithzr
Participant@jwebkat thanx a lot ……. thats wat i needed…….
@Paulie_D may u r rite as i thot that i know everything about those stuff ….. but i guess i was wrong…… as i said theres no one to guide or even hint me….
watever i am, i am the best at ma skul…… so it’s kind of hard for me to know about thing …. so wenever i get time on net i just download as many webpages/ tutorials as i can and read various forums……. this forum has been the best for me…. it would surely help me learn…..November 25, 2012 at 5:08 am #115419Rohithzr
Participanttalking about the effect … i actually wanted a 0.5 opacity background but 1 opacity text….. i placed it as position absolute but didnt really work with changing screen sizes …. so i wanted a relatively sized and positioned divs…. hope i make a bit sense
November 25, 2012 at 5:14 am #115421Paulie_D
MemberDepending on what your background is you might not need the extra div.
If it’s a color, you can set the color using rgba and apply an opacity that way.
We’d need to see what it is you are trying to do…can you provide us with an image?
November 25, 2012 at 5:22 am #115422Rohithzr
Participantwell just tried and it worked both the ways……. man u people are brilliant
it was both [image at places and color at other places]
really really thank you -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.