Adding a 'Close' button and it's script in my page?
Auteur : Mandar V.
Visité 1702,
Followers 2,
Partagé 0
I have used this page on a website that opens in a new window of the browser.
https://www.vikasseva.org/terms&conditions.html
Want to include a 'Close' button at the bottom of the window. Please guide me, what html script to use for that. And can I add that script to an image?
Thank you.
Mandar
Posté le
Hello Mandar:
Goggle translate.
I give you three ways to do it.
1) a simple button.
2) a css styled button.
3) a button with css style and image.
<style>
/* 10 styles for buttons. */
.button{
width: auto;
height: auto;
background-color: #3f7d95;
border: solid 0px #ffffff;
color: #ffffff;
padding: 10px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-family: "Open Sans", sans-serif;
font-size: 16px;
margin: 4px;
cursor: pointer;
border-radius: 9px;
transition-duration: 0.8s;
box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 10px 1px rgba(0,0,0,0.3);
/* max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; */
}
.button1 {background-color: #3f7d95;}
.button2 {background-color: #fF2300;}
.button3 {background-color: #3f51b5;}
.button4 {background-color: #E91E63;}
.button5 {background-color: #23a2ab;}
.button6 {background-color: #9e6e9c;}
.button7 {background-color: #9e113a;}
.button8 {background-color: #06618f;}
.button9 {background-color: #1C7E5E;}
.button10 {background-color: #F19403;}
.button1:hover {background-color: #ff2300; border: solid 2px #ff2366;}
.button2:hover {background-color: #4CAF50;}
.button3:hover {background-color: #F19403;}
.button4:hover {background-color: #2CB67C;}
.button5:hover {background-color: #91ab41;}
.button6:hover {background-color: #99B62C;}
.button7:hover {background-color: #3f51b5;}
.button8:hover {background-color: #2196F3;}
.button9:hover {background-color: #E91E63;}
.button10:hover {background-color: #fF2300;}
</style>
<div>
<h4>Button simpli</h4>
<button onclick="window.close();">Close Window</button><br>
<h4>Buttons with style css</h4>
<a class="button button9" onclick="window.close();">Close Window</a><br>
<a class="button button5" onclick="window.close();">Close Window</a><br>
<a class="button button3" onclick="window.close();">Close Window</a><br>
<h4>Button with imagen</h4>
<a class="button button10" onclick="window.close();"><img src="https://www.radiomazz.com/files/Logo2021RM600x600px.png" alt="Close Window" style="width:100px;height:100px;"></a><br>
</div>
The buttons look like this:
Just choose the colors you like and change the code in the css style or choose the number with the color I assigned.
You know, the buttons go in an html object. and the css style goes in the advanced option of the html object. (if styles don't work for you, you'll have to put the style in the page properties before the closing head tag)
I assume that if you are going to use an image as a closing link, the image must mention it.
I assume you have the terms and conditions page hidden?
This should be 100% visible in the bottom menu.
I hope this is helpful to you.
Auteur
Thank you, dear friend, Miguel Galarza for your timely guidance.
I did it successfully because of your guidance.
Do visit the link again to confirm it.
Regards
Mandar
@Mandar,
it works !
Enjoy!
Axel
Auteur
Thanks Axel.
Very much cooperative community. I'm literally 'dumb' in scripting. Don't even know basic html.
But happy to tell you that I'm a successful website designer in our region.
My special thanks to our community, who is helping me for many years. I am using WX5 since its 8th version. Now please calculate the number of years I am using it.
Thank you once again.
Regards
Mandar Vaidya
Maker of :
https://www.ambabai.com/ - This is the supreme goddess in Hindu mythology.
https://www.hotelopal.co.in/ - A popular hotel for authentic local cuisine serving for 53 years.
https://www.radhanagari.com/ - World famous biodiversity region in the western ghats of India.
https://www.mandarvaidya.com/ - This is my website. Popular because of your help & support.
Hey Mandar,
Like you are a website designer, you can check here somme custom payment plugins specific for India.
Could be intersting if you create some eCommerce website
http://wsx5plugins.afsoftware.fr/plugins.html
Hope this helps
Enjoy!
Axel