z-index issue - positioning css3 triangle underneath menu - html

Hi and thanks for taking the time to look into my issue.
I am trying to implement a menu that looks just like this:
The main thing here is creating those triangles for either side, then positioning them underneath the menu to give it a 3d effect.
I made it work just find on the site above but I can't seem to make it work on this other project.
Here is the site I am trying to get it to work with:
Setting the the z-index: -1; put the triangles behind all of the background images including the white bg on body, where in the other site setting z-index: -1; leave the triangles just above the body bg.
I have tried setting all the bg images to z-index: -1; and the triangles to z-index: 1; and the menu to z-index: 2; but still can't make any work.
Can anyone give me some better insight on how the z-index property can be used in my particular situation?
Thank you.

Okay, I'm having trouble figuring out what exactly it is you're looking at/want, but these elements you're working with are positioned, correct? Z-index won't work if they aren't positioned as absolute, relative, or fixed.
W3Schools on Z-index

I was able to figure out my issue by using this answer:
stackoverflow.com/questions/8456575/3d-ribbon-corners-how-to-do

Related

half page's width background

I'm trying to create a menu which is divided by 50% width.
this is what i've been trying so far:
http://jsbin.com/gobacewovu/1
so, as you can see, my problem is that the "search" text is invisible. I noticed this problem and created another page, using a "menu" class.
http://jsbin.com/melekitata/1
the problem is now bigger. I was even looking for a solution in this site but I have not found a solution yet, though.
does anyone can help me with that, I'm seriously stuck.
thanks.
It is because #look has fixed position, you would need to give #search position: relative; z-index: 1; to place it higher up the stacking order.
CSS
#search {
position: relative;
z-index: 1;
}
I'm not completely sure what you are trying to achieve with this layout however but if you give me some more info I can help you.

Images in front of a border

this is what I'm trying to achieve: http://imgur.com/2OqnSIu
Three hours passed and I still can't figure it out how to do this. I've tried everything with positions and z-index but nothing works. I really don't want to use everything in a single image(border + pictures) and using it as a background because I'm trying to do a responsive website. Any ideas ? Thanks
I've tried to understand your question, but without real examples it's very difficult to uderstand:
Anyway, here's a JsFiddle which I've created which I do believe is what you need.
I do have a container with a padding, which is holding another container with a border. On top of that particular border an image is showed.
The above example is achieved by using z-index and relative positioning:
img { position: relative; z-index: 100; top: 100px; left: -30px; }

Uncovering Logo - Blocked by Background Image from Another DIV

At this link, you can see the bottom of the logo is blocked by the background image in the next DIV going down the page. I thought z-index was supposed to control this, but I am stumped.
http://dansdemos.info/prototypes/htmlSamples/responsive/step15_LogoProb.html
Is there a good way to put the logo where it goes on this page?
Any assistance will be extremely much appreciated.
Thank you.
Check this out: Z-index not working as expected working with picture and background-div
It may be that you need to set the logo to position: relative in order for z-index to work.
if you set the logo:
position: absolute
or
position: relative
that will work, its weird but that works. now the thing is that with position absolute you have to set the left or rights..

Image obstructing my navigation bar and the image above. Basic HTML/CSS issue

I have an image on my site that I want to be set as it's own entity that I can freeform and adjust without it conflicting with other elements, I have it's CSS as
#backgroundImage{
position:absolute;
float:right;
top:0;
left:50%;
}
Using fixed and absolute positions cause the image to stack level to the Nav bar, but any other position will cause the Nav bar to jump right under the image I'm using (it's a picture of the moon) It is cutting off the image, text, but it's behind the Nav bar.
Things I have tried: Putting it inside of a I have no idea how that would work out, and I tried floating it contained inside of a div.
I have also read some comments about putting it on the z or y axis, but I have no idea what that means, I'm still reading about it or trying to find something to help me understand it.
This is for a school project, I am still very basic in this field.
Use a z-index of -1:
#backgroundImage {
z-index: -1;
}
Also, it's not recommended that you name elements with camel-case - use dashes instead.
If you want the element completely on it's own try using the element from html. However, then it won't necessarily stay in the background. Hopefully this is what you were looking for

Multiple background images

First, a warning, I have come back from a years break of html/css and have pretty much forgotten everything, so I'm at newbie level again.
I have been trying to add background images - one at top left and one at bottom right. What I have at the moment can be seen here: http://test.nihongohub.com/Mainsite/firstsite.php as you can see if you change the width of the browser the div containing the img will hit my main part and ruin it.
I have tried a few fixes suggested on stack overflow but none of them worked. Does anybody have any suggestions how to fix this. A friend suggested that I add the img to the footer and squeeze it out, but I don't like this idea.
2 things I want this image to do, move with the browser window, and be able to go behind my main page.
Thanks for any help offered
You could try using fixed positioning and the use z-index to move it to the back, ie.
#bottom_leaf_holder {
position: fixed;
bottom: 50px;
right: 0;
z-index: -1;
}
edit: I ment fixed, changed the answer.
You could put all your content in a div, and add a css rule to that div. Something like
#main_holder {
background: transparent url('img.jpg') no-repeat bottom right;
}
The best solution for this would be to have a wrapper div just inside the body tag that contains only the background image. This will act similar to the body tag allowing you to place an image that does not interfere with the layout and will go underneath your content if the viewport is small.