How to display a div as overlay which is hovered by a div which is inside another div?
Tags: html,css,css3
Problem :
How to display a div as overlay which is hovered by a div which is inside another div. This is the sample code which I tried to display the div as overlay box
CSS
/*This is container Div */
#one{
position:absolute;
background-color:#999;
width:200px;
height:200px;
z-index:1;
}
/*This is Hovering Div which is inside container Div:*/
#oneone
{
position:absolute;
background-color:#fff;
width:50px;
height:50px;
left:100px;
top:90px;
z-index:5;
}
/*This is the Overlay Div*/
#two{
position:absolute;
background-color:#000;
width:200px;
height:200px;
left:200px;
top:290px;
z-index:20;
display:none;
}
/*This is the Div displays after Hovering*/
#oneone:hover #two{
display:block;
}
HTML
<div id="one">
<div id="oneone"></div>
</div>
<div id="two">
</div>
Pls help.. thanks in advance.
The Jfiddle : http://jsfiddle.net/stylerkishore/DySxJ/
Solution :
i created a jsfiddle for you
i modified a bit the html, so that #oneone and #two to be at least siblings in the same container
<div id="one">
<div id="oneone"></div>
<div id="two"></div>
</div>
also i changed the css selector
#oneone:hover + #two {
display:block;
}
CSS Howto..
Set position:fixed to the footter header { width: 100%; background-color: #000000; height: 8%; min-height: 8%; z-index:1000; position:fixed; /*.........^........*/ top:0; } footer{ bottom: 0; background-color: #000000; z-index:1000; width: 100%; height: 6%;...
It certainly is possible to replicate it, but not without some trickery. You can see a working example here: http://jsfiddle.net/u3n5c/ The essence to solving the problem is realizing that the...
There is 'override' property in the skin config. That allows you to use differents skin for some modules. You may create a skin with your own css file, and tell...
Try this? <div class="mobile-area"> <p>Mobile App</p> <a class="mobile-icon current-device" href ng-click="iphoneView=true;tabletView=false"></a> <a href ng-click="tabletView=true;iphoneView=false" class="tablet-icon"></a> </div> <div class="mobile-preview"...
This cheap and simple answer is to add "float: left" to your #placementContainerLeft #placementContainerRight. There may be better ways to do this, but I think this is the simplest. UPDATE:...
I assume that your login form has an external CSS file, and that you're using Cassini or IIS 7 integrated mode. Your <deny users="?"/> is preventing anonymous users from seeing...
Here is an example of how it can be done with just plain CSS. Be sure to add any vendor prefixes. div { box-shadow: -1px 1px 0px 1px rgba(0,0,0,0.5), -2px...
Reverse the order of your sections and use this CSS: #section-left { overflow:hidden; } #section-right { width:220px; margin-left:30px; float:right; } jsFiddle example...
http://jsfiddle.net/Ft7DP/ <div id="menu"><ul><li>First</li><li>Second</li><li>Third</li></ul></div> That's sorta the same stuff you had in your fiddle. Below is a simplified version of the CSS, the minimum amount to make it work as you...
A little change in your CSS and jQuery will lead you to achieve this easily. Here's the updated Codepen Updated SCSS: .block__content { max-width: 1280px; margin: 0 auto; display: inline-block;...
I think the relevant bits are: .nav__item-wrapper > * { transition: transform .5s cubic-bezier(.23,1,.32,1),opacity .5s cubic-bezier(.23,1,.32,1); } And then for each item in the menu they set a incrementing animation...
Without knowing your structure it's hard to be definitive but the nth-of-type selectors can help here. div:nth-of-type(4n+3) { /* every 4th div starting at 3 */ background: red; } div:nth-of-type(4n+4)...
Here, I've created a fiddle with what I believe is what you want. Just give the active tab the class "active" http://jsfiddle.net/ctwheels/wsLu306f/ HTML <a href="http://tobiasahlin.com/blog/" class="underlined-example active link">Hover this link</a>...
You've not specified any styles for the object that you're adding, so it doesn't know to fill the container element. Add the following css... #content object { height: 100%; width:...
You can shape all kind of chars using any kind of unicode character. In your case for example you just have to use something like: .icon:after { content:"\25bc"; } or...
Just change position attribute of main ID div to absolute. Use this: position:absolute; Note: You are facing problem because of right side section main ID consuming space. Full css: #main...
Give both the image and the text a vertical-align: middle - the text needs to be contained in an element that is also display: inline. So markup like this: <div>...
In your css file you need to add div.footer-wfix { clear:left; } Should do the trick. ...
Your <a> elements are not adjacent siblings (or siblings at all), so the adjacent sibling selector (+) doesn't apply to them. The div elements are siblings. body div:first-child a:hover//The first...
the problem is, that you got a fixed value for the padding... so if the browser is smaller than the comulative padding pixels... it won't fit... a possible solution would...
It must be overridden. You could use: <!-- Add a class name to override --> <select name="funTimes" class="funTimes" size="5"> #elementId select.funTimes { /* Override styles here */ } You could...
If you just want to display an image at different sizes on your web page, your code is on the right path. http://jsfiddle.net/0q527ush/ HTML <div class="div_100">IMAGE</div> <div class="div_80">IMAGE</div> <div class="div_50">IMAGE</div>...
This is an example for one way this could be done. Of course, you can experiment with diff methods and stuff, but this is a basic working solution. A dropdown...
you are actually very close to a working transition with the code you have. I've implemented a more complicated hero transition on my website and took some code from there...
It's fairly easy to make a simple pie chart. We just need to use a little trigonometry to calculate the coords of the arc to the percentage position. And since...
Sure: .OwnerJoe:before { content: "Joe's Task:"; font-weight: bold; } ...
You could use a border trick with some pseudo elements for this: .onecorner, .twocorners { height: 50px; width: 300px; line-height: 50px; text-align: center; background: lightgray; margin-left: 25px; margin-right: 25px; position:...
Javascripts element.style only returns inline styles, for other styles, for instance set in a stylesheet, you'd have to use getComputedStyle var longbox = document.getElementsByClassName("long_box")[0]; var styles = window.getComputedStyle(longbox); var lef...
its quite easy ! here the tricks . on hover it will slightly out of it's box as picture shows body { background-color: lightblue; } #box{ width:100px; height:100px; background:red; margin-top:-100px;...
This was what I was looking for: @Html.Sitecore().Field("MyFieldName", myItem, new { Parameters = new SafeDictionary<string> { { "enclosing-tag", "h2" } } }) http://www.sitecore.net/Community/Technical-Blogs/SitecoreBetter/Posts/2013/06/Extending-the-Sitecore-renderField-pipeline.aspx...