I have embedded a streetview map that I want to only perform the action to look around (by click and drag with the mouse or with the compass) but not to move to a direction.
I tried by applying pointer-events to none but that stops all pointer actions.
Here is a link to my code: https://jsfiddle.net/Dimgk1984/8tnxo3as
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Street View controls</title>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div class="map-container">
<iframe src="https://www.google.com/maps/embed?pb=!4v1518736193836!6m8!1m7!1szChzPIAn4RIAAAQvxgbyEg!2m2!1d29.56028532748453!2d-95.08539144618427!3f213.12!4f0.18000000000000682!5f0.7820865974627469" style="margin-top:-100px" width="100%" height="1000" frameborder="0"allowfullscreen >
</iframe>
<style>
.map-container {
pointer-events: none;}
</style>
</body>
</html>
Try to set StreetViewPanoramaOptions to False and/or LinksControl. On Gmaps streetview API reference they also mention streetViewControl. Try it. Its pretty well documented on their reference page.
Related
Code:
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<style>
button {
min-height: 32px;
}
</style>
</head>
<body>
<button>Hit Me</button>
</body>
</html>
In Chrome 72, Developer Tools show that the button has a height of 18px only. Why?
New Code:
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<style>
button {
min-height: 32px;
background: lightgray;
}
</style>
</head>
<body>
<button>Hit Me</button>
</body>
</html>
Now the button height becomes 32px.
Why is the button height not honoring min-height without a background set?
Browser issue
First of all, I've made a Fiddle right here where you can try with different things/browsers.
button {
height: 32px;
min-height: 32px;
}
This seems to work.
Is it only you?
No, as remarked here by #Michael_B, it seems to be a "browser thing", not only with min-height but with height and more.
So first you have the W3C standards, which are a set of guidelines for browser makers. And then you have the browser makers, who are free to do whatever they want.
If you also try with a Safari browser it stays with the 18px, but not with Firefox.
I don't exactly know why it works for example setting a background and neither could find it, but in my opinion, with height: 32px; //same as min-height is a "cleaner way" of getting through this.
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<style>
button {
height: 32px; /*Here you should put the min-height value*/
min-height: 32px;
}
</style>
</head>
<body>
<button>Hit Me</button>
</body>
</html>
UPDATE 1
If you want to the button to have dynamic height (let's say 100%) to its parent, just do:
div {
height: 10px;
min-height: 32px;
}
button {
height: 100%;
}
If you see, as the button is height: 100%; to the div (its parent), setting min-height to it will work perfectly and your button could dinamically change its height.
You could also go for:
button {
min-height: 32px;
border: 0;
}
Otherwise please tell your specific case for what you want to achieve.
Hope it helped.
I'm developing chrome extension, I want to make border radius and use radius border propery in css, but it boder in child elemement.
My code html here :
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" style="border-radius:10px">
<head>
</head>
<body>
content here
</body>
</html>
I want border as picture below :
http://postimg.org/image/8ct4dcq93/
Unfortunately, I don't think you can do it.
The frame around the popup page (highlighted in red in a graphics editor) is fully controlled by Chrome:
You can't change its shape / color, just like you can't change normal Chrome chrome (pun intended).
There is one to make the popup.html border-radius that to add another Div container to popup HTML, set the body background to none and give the background color to the div container. After that, you can give the radius to the container.
e.g
body {
background: none
}
.container {
background: green;
border-radius: 10px;
width: 50%;
height: 100px;
text-align: center;
}
<body>
<div class="container">
The content is here....
</div>
</body>
Your supposed to style the html tag, not the body tag.
html {
border: 5px solid rgb(200, 200, 200);
}
<!DOCTYPE html>
<html>
<header>
<link rel="stylesheet" href="popup.css">
</header>
<body>
<h1>Hello World!</h1>
<script src="popup.js"></script>
</body>
</html>
Basically I am using the "Tryit Editor" from the W3 website and
this is the code I started out with
<!DOCTYPE html>
<html>
<head>
<style>
body
{
background-image:url("img_tree.gif"),url("img_flwr.gif");
background-color:#cccccc;
}
</style>
</head>
<body>
</body>
</html>
I wanted to change the background color and background images so that they were only found on a div, not on the whole page. I also wanted to move the div around the page. I was able to make the div with the background elements, but I wasn't able to move it around the page. I used the following code, thinking that
top:150px;
left: 150px;
would have caused the div to change position
<!DOCTYPE html>
<html>
<head>
<style>
div
{
position=fixed;
top:150px;
left: 150px;
background-image:url("img_tree.gif"),url("img_flwr.gif");
background-color:#00dccc;
height: 200px;
width: 200px;
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>
Alas, the div did not change position. What gives?
Thanks! :]
You have an equals sign rather than a colon in your position declaration which is causing the page to ignore it. Change that and it'll work!
EDIT: Thanks for fixing my awful terminology Pavlo, can't believe I did that :P
Your code is wrong. It should be
position: fixed;
I am trying to position a large container div 60 pixels above the browser bottom so as to make room for a video stream and still images, very similar to this solution here.
Unlike the common sticky/fixed type footer, the container is kept in its place on visiting the page and subsequent browser resize - but can be scrolled up for users wanting to explore the site's content.
Looking at the sample site, I can see that the CSS property "top" changes on browser resize, but I can't find the mechanism that accomplishes this.
How should I go about achieving this kind of elasticity?
Thank you very much in advance!
You can do this with Javascript along the lines of
setTop = function(e) {
document.getElementById('content').style.marginTop = window.innerHeight - 60;
};
window.onresize = setTop;
Full working example:
<html>
<head>
<title>My Page</title>
<style type="text/css" media="screen">
#content {
width: 80%;
margin: 0 auto;
border: 1px solid black;
height: 100%;
}
</style>
</head>
<body>
<div id="content">
Here is the content...
</div>
<script type="text/javascript" charset="utf-8">
setTop = function(e) {
document.getElementById('content').style.marginTop = window.innerHeight - 60;
};
setTop();
window.onresize = setTop;
</script>
</body>
</html>
I have a div that is absolutely positioned so I can place it overlapping an image. the problem is that the empty part of the div is making the image beneath it unclickable. in IE the image is still clickable but in FF or chrome its not/
Add position: relative; to the image. Here's an SSCCE, copy'n'paste'n'run it.
<!doctype html>
<html lang="en">
<head>
<title>SO question 2750416</title>
<style>
#overlap {
position: absolute;
width: 100%;
height: 61px;
background: pink;
}
img {
position: relative; /* Without it, the image disappears "behind" div */
float: right;
}
</style>
</head>
<body>
<div id="overlap">Overlap</div>
<img src="http://sstatic.net/so/img/logo.png" onclick="alert('Clickable!')">
</body>
</html>
You can't fix this through CSS alone. The easiest way is to set the div onclick event to the same function as your image onclick.
You can use the CSS4 experimental feature pointer-events:none on your absolute element. Problem with this feature is that it doesn't work in all browsers, only firefox and chrome as far as i know.
Just sharing a bit of information :)