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; }
Related
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.
I have an image that I want to fix over the slider (can't put it in the slides themselves as an image because it needs to stay static) but for the life of me, I can't figure out how to get the image to display on top of the slider image.
It seems like the plugin's parameters have it set up so the slider will be on top of the page no matter what, either that or I am missing something.
The URL for the site is: http://dev.minnesotaimed.com/
More info: The image I want to move is the one w/ 4 circles, I am hoping to put it up on the right side of the slider area.
Any help would be beyond appreciated, we're on a incredibly tight deadline and I'm getting dirty looks because I can't seem to solve this quickly. Thank you so much for any help!
Try using this code for the image. This would put the below mentioned 4 circles image on the slider above. I hope it helps. Please mention in comments if there's a concern.
CSS:
img.alignright, .wp-caption.alignright {
margin: 4px 0px 2px 10px !important;
z-index: 9999999;
position: absolute;
top: 200px;
}
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
In here and here, there are some examples of the quiz questions that are used in Udacity.
How can I achieve such an effect ? (i.e. : how can I build a page where I have an image, and then some form elements over that image ?)
Maybe I could use a table with the image as background. Would that work ? Would it be reliable across browsers ?
There are different possibility.
You could place the elements with "absolute" or "relative" position in order to get the element exactly over the image.
You could also draw with a CSS3/HTML5 Canvas.
I think the best thing to do a simple form with an image should be following this tutorial
If you manage to create that then you can tweak the CSS code in order to be able to place the card where you want
They just have an image and then absolutely position form elements on top of it.
input {
position: absolute;
top: 100px;
left: 100px;
z-index: 1;
}
Just need to change top and left until the input element is where you want it. The input elements can sit right on top of the image.
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.