The following CSS opens a modal window within the iframe as it should. But I would like the modal popup to overlay the parent and not just within the ifram. Is there a way to modify the CSS to get the popup to overlay the parent? Just as a side note, the id of the iFrame may change, so I won't be able to rely on a specific id. All suggestions are appreciated, I'd even consider another tool such as javascript.
<iframe frameborder="no" height="200px" id="066E0000001KmQ9" marginheight="0" marginwidth="0" name="066E0000001KmQ9" scrolling="no" title="PredictiveWholesalingRelatedList" width="100%">
<apex:page standardController="Contact"
extensions="myExtension"
sidebar="false"
showHeader="false"
title="My Page">
<apex:form >
<apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="tstpopup"/>
<apex:pageBlock >
This is just filler text from the Salesforce General.
</apex:pageBlock>
<apex:outputPanel id="tstpopup">
<apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
<apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
This is where I would put whatever information I needed to show to my end user.<br/><br/><br/>
<apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="tstpopup"/>
</apex:outputPanel>
</apex:outputPanel>
</apex:form>
<style type="text/css">
.custPopup{
background-color: white;
border-width: 2px;
border-style: solid;
z-index: 9999;
left: 50%;
padding:10px;
position: absolute;
width: 500px;
margin-left: -250px;
top:100px;
}
.popupBackground{
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 9998;
}
</style>
I'm trying to use this example: http://www.salesforcegeneral.com/salesforce-modal-dialog-box/
Try to change your .custPopup to:
.custPopup{
background-color: white;
border-width: 2px;
border-style: solid;
z-index: 9999;
padding:10px;
}
Related
Similar to these, but with a separate border. I asked this question earlier, but didn't realize there were other methods besides using linear gradients.
Examples: http://i.imgur.com/TqVR67J.png
It's not pure CSS (and probably not exactly what you're looking for), but you could just do a larger element first that just forms the border, and then have a smaller sibling element with offset afterwards:
<div id="background"></div>
<div id="foreground"></div>
and then the css:
#background{
position: absolute;
}
#foreground{
position: relative;
top: 5px;
left: 5px;
}
(Obviously, you would have to add all of the styling and extra tags for the beveling.)
Take a look at this fiddle. This might gave you an idea of how to create it with css.
Beveled border with css
HTML
<div class='box'>
<img src="http://placehold.it/350x150" />
<img class='cart' src="http://www.rotweinelang.at/themes/wein/img/elements/smallShoppingCartIcon.png" />
</div>
CSS
.box {
width: 350px;
position: relative;
}
.box::after {
content: "";
position: absolute;
top: 0;
right: -2px;
border-style: solid;
border-width: 0 40px 40px 0;
border-color: transparent #fff transparent transparent;
}
.cart {
position: absolute;
top: 0;
right: -4px;
z-index: 1;
}
I have tried all the help provided but still can't get it to work.
I need the video to be width: 100% and height: 500px and when I tried other solutions provided
here it worked but the video was a centered square in the middle rather then wide screen.
Any help will be appreciated.
Thank You.
Here is what I tried: HTML:
<div class="header-unit">
<div id="video-container">
<video autoplay loop class="fillWidth">
<video id="video-overlay">gfgfgfgf</video>
<source src="makak.mp4" type="video/mp4" />
<source src="http://Dimofinf.net/your-video-file.ogg" type="video/ogg" />
<source src="http://Dimofinf.net/your-video-file.webm" type="video/webm" />Your browser does not support the video tag. I suggest you upgrade your browser.
</video>hghgfhgh
</div>
<!-- end video-container -->
The SASS kokozino: SASS:
.header-unit
height: 500px
border: 2px solid #000
border-right: none
border-left: none
position: relative
padding: 20px
#video-container
position: absolute
z-index: 0
#video-container
top: 0%
left: 0%
height: 100%
width: 100%
overflow: hidden
position: absolute
z-index: 1
video
position: absolute
video.fillWidth
width: 100%
#video-overlay
position: absolute
z-index: 2
width: 600px
height: 500px
background: #333
Once again thank you!
I think you need to add maximum value of the z-index (z-index: 2147483647;) in to your overlay element. this trick will solve your problem.
check out this awesome fiddler example.
#overlay {
position: absolute;
top: 100px;
color: #FFF;
text-align: center;
font-size: 20px;
background-color: rgba(221, 221, 221, 0.3);
width: 640px;
padding: 10px 0;
z-index: 2147483647;
}
#v {
z-index: 1;
}
<div id="map" class="cf">
</div> <!-- /#map -->
#map a.bull{
position: absolute;
z-index: 999;
width: 6px;
height: 6px;
color:red;
border-radius: 50%;
}
#map a.washdc{
top:10px;
left:100px;
}
I am having trouble displaying this link. I have set the width and height, but the red background does not appear.
Your .bull anchor doesn't have anything in it or a background so it's not going to show you anything, because there is nothing to see.. Try this.. See it working here
#map a.bull{
position: absolute;
z-index: 999;
width: 6px;
height: 6px;
color:red;
border-radius: 50%;
background:red;
}
In CSS, the 'color'-attribute assigns the color of the text.
Since you don't have any text in there, there won't be any text becoming red.
In your case you should add a 'background-color' to make something show up.
Hoping someone might be able to help me with this.
I have a header graphic which I've floated / positioned multiple transparent (png) images on.
One of these images is a "Call Us - 555-555-555" graphic (transparent png)
What I am using right now:
<img src="http://www.domain.com/images/numfloat.png" alt="Call Now!" id="flo">
It appears anytime I add an "id=##" to this, it breaks the link functionality. Same when I tried this with text.
Would anyone have a solution for this they could share with me please?
Thank you!
Update:
The contents of the header area:
<div id="header-box">
<a id="header-link" href="http://www.domain.com"></a>
<a class="call" href="tel:000-000-0000">
<img src="http://www.domain.comimages/numfloat.png" alt="Call Now!" id="flo">
</a>
</div>
The relevant CSS:
#flo
{
width: 220px;
height: 83px;
}
.call
{
position:absolute;
top: 43px;
left: 810px;
}
#header-link {
position: absolute;
top: 43px;
left: 575px;
width: 200px;
height: 80px;
background-color: transparent;
border: 0px solid yellow;
}
.custom #header {
position:relative;
padding-left: 0;
padding-right: 0;
border-bottom: none; margin-bottom: 15px; height: 190px;
background-image: url(http://www.domain.com/images/header_graphic.jpg);
}
You are moving your image out of your link by moving the image with the position absolute. Do this:
CODE: http://jsfiddle.net/D67zL/1/
HTML
<a class="call" href="tel:555-555-5555">
<img src="http://www.domain.com/images/numfloat.png" alt="Call Now!" id="flo">
</a>
CSS
#flo
{
width: 220px;
height: 83px;
}
.call
{
position:absolute;
top: 43px;
left: 810px;
}
Turned out it was the menu container below the header that was stretching over the graphic I was trying to link.
The solution jtorrescr was correct but was being undone by my menu!
I have the css code below along with an image to show it's output. I need help though 2 things.
This code works pretty good to show the username on the photo, however I noticed today while using chrome all day often when I would click a link that would take me to the page that has images with this code, it would not show the name on the image, it would just show the name below the image and the transparent black div would not be visible at all and the name would not even be on the image, I would then refresh the page and it would work fine, what could cause this, this was while my PC was acting like it was short on memory, could that be part of the issue?
I would like to make a bar show at
the top of the image that is the
width of the image and like maybe
2-3 pixels tall and have a
background color of like blue. What
I am wanting to accomplish is for
femail users there will be a pink
bar over there image and a different
color for males. Can someone who
knows css help me modify this to do
that the best please
<style type="text/css">
div.imageSub { position: relative; }
div.imageSub img { z-index: 1; }
div.imageSub div {
position: absolute;
left: 0px;
right: 0px;
bottom: 0;
padding: 5px;
height: 5px;
line-height: 4px;
text-align: center;
overflow: hidden;
}
div.imageSub div.blackbg {
z-index: 2;
background-color: #000;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
filter: alpha(opacity=70);
opacity: 0.5;
}
div.imageSub div.label {
z-index: 3;
color: white;
}
</style>
<div class="imageSub" style="width: 90px;"> <!-- Put Your Image Width -->
<img src="http://cache2.mycrib.net/images/image_group66/0/43/t_6871399b0962b5fb4e29ce477541e165950078.jpg" alt="Something" width="90"/>
<div class="blackbg"></div>
<div class="label">Sara</div>
</div>
Since I've written this code for you, seems logical that I also try to fix it...
It seems that Chrome is struggling since it doesn't know the height of the element. Let's use margins instead of positioning
Also, since you are using a set height, you could drop positioning all together and use the following CSS (In which case you shouldn't need the above code):
div.imageSub img { z-index: 1; margin: 0; display: block; }
div.imageSub div {
position: relative;
margin: -15px 0 0;
padding: 5px;
height: 5px;
line-height: 4px;
text-align: center;
overflow: hidden;
}
div.imageSub div.blackbg {
z-index: 2;
background-color: #000;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
filter: alpha(opacity=70);
opacity: 0.5;
}
div.imageSub div.label {
z-index: 3;
color: white;
}
EDIT: You've asked for a top colored bar for the gender. You can use the following HTML:
<div class="imageSub" style="width: 90px;"> <!-- Put Your Image Width -->
<img class="female" src="http://cache2.mycrib.net/images/image_group66/0/43/t_6871399b0962b5fb4e29ce477541e165950078.jpg" alt="Something" width="90"/>
<div class="blackbg"></div>
<div class="label">Sara</div>
</div>
With the following CSS:
div.imageSub img.female { border-top: 10px solid red; }
div.imageSub img.male { border-top: 10px solid blue; }