i need a background image to change on menu text hover css - menu

/add background image/
body #page-container
.et_slide_in_menu_container
{
background: url('https://24hr-locksmith.co.uk/wp-content/uploads/2022/07/pexels-paloma-clarice-2802688-scaled-1.jpg') center center !important;
background-size: cover !important;}
.site-footer > .site-info { display: none; }
/add background image on hover/
#menu-item-538:hover
{
background: url('https://24hr-locksmith.co.uk/wp-content/uploads/2022/07/pexels-photo-775201.jpg') center center !important;
background-size: cover
!important;
}

Related

Apply Ngx admin background image

I need to apply background image for ngx-admin
http://akveo.com/ngx-admin/#/pages/dashboard
similar to http://akveo.com/blur-admin/#/tables/basic.
Gopi
try this...
body.nb-theme-cosmic::before {
position: relative !important;
background: url(http://akveo.com/blur-admin/assets/img/blur-bg.jpg) center center no-repeat !important;
background-size: cover !important;
}
Try add this to your #theme/styles/stlyes.scss
.nb-theme-corporate nb-layout-header.fixed ~ .layout-container{
background:url(your-url);
}

How to use flash message in keystone.js?

I am use this code to display flash message
req.flash('success', 'Data saved...!!!');
When flash message is shown it looks like its part of content of website. So, is there any other way to show a message in keystone.js.
You just need some CSS to make it fixed in the center of the screen above everything else:
#flash-messages {
position: fixed;
top: 50%;
left: 0;
right: 0;
display: block;
z-index: 9999999;
text-align: center;
}
.alert{
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.34);
color: #fff;
h4 {
font-size: 4rem;
}
}
.alert-warning {
background-color: #d80000;
border-color: #9c0000;
}
.alert-success {
background-color: #2c9800;
border-color: #247d00;
}
For FlashMessage it looks like part of the website
you imported/included the FlashMessage Mixin/Component in your view by the generator, otherwise, it won't show up.
For how to use FlashMessage
1. inclouds the FlashMessage Mixin in view, to where you want.
2. trigger FlashMessage API in controller ./routes/views/*.js when condition match.
- `true` send all error messages to `req.flash`
- `"validation"` only send validation error messages to `req.flash`\
- `"update"` only send update errors to `req.flash`
3.the message data will available in res.locals.messages for View to use.

SVG cannot resize to parent container

Hi guys i have a problem in IE 11. I have a embed svg which need to interact with its elements... Here is the example just click on floor 5 :
http://infinityproperty.sitetester.biz/floorplans/59
In Chrome and Firefox everything is ok bur in IE it is too little? What could make this thing?
For someone which try everything to resize svg in ie there is a problem with inline svg. When you try to resize it in 100% width it works fine in the major browsers but IE refuse to resize it.
I have managed it to work with one css hack here it is.
Conteiner:
#svg {
display: inline-block;
padding-bottom: 70%;
position: relative;
vertical-align: middle;
width: 100%;
}
#svg svg {
display: block;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
Also remove the width and height of the svg.
With this i got it to work. :)

How to center my webpage

http://pastebin.com/GQ6Q0dti
-- I want to center my webpage but I've found no successful tutorials.
Could someone please help me and fix my problem
I just want to center my page. Thanks
If you want to center it horizontally+vertically use position: absolute;
Demo
.center {
position: absolute;
top: 50%;
left: 50%;
height: 200px;
width: 400px;
margin-top: -100px; /* Half of container height */
margin-left: -200px; /* Half of container width */
}
and if you want to center it only horizontally simply use this
margin: 0 auto;
^ ^
T/B L/R
Just don't forget the width to the container ;)
if you want to make horizontal center only, the best way is not to use absolute position, use default position and set margin:0px auto;
#Table_01 {
width:792px;
margin:0px auto;
}
#template {
height:1584px;
}

Change Google Maps Infowindow Close Icon

How can I change the default graphic for the Infowindow close button?
You can do it with CSS, like this:
img[src="http://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif"]
{ content:url("/img/own_close_button.png"); }
Works on:
Chrome 14.0.835.163
Safari 4.0.5
Opera 10.6
Most mobile devices (default browser)
Does not work on:
FireFox 27.0
IE 11.0
If you're using google maps API V3, then you might want to use the official add on infobox.
Google Maps Utility - Infobox
First you need to hide the default close icon:
.gm-style-iw button.gm-ui-hover-effect img {
display: none !important;
}
Second, force the default button (that holds the image) to have full opacity:
.gm-style-iw button.gm-ui-hover-effect {
opacity: 1 !important;
}
Third, set your own image and position it:
.gm-style-iw button.gm-ui-hover-effect:before {
display: block;
content: "";
background: url('assets/close-red.svg') center center no-repeat;
background-size: cover;
width: 8px;
height: 8px;
right: -19px;
position: relative;
}
Result:
With jQuery you can change the image file location. If I have an image button_close.png that is 16px in size:
jQuery('img[src="http://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif"]').livequery(function() {
jQuery(this).attr('width', 16).attr('height', 16).css({
width: '16px',
height: '16px'
}).attr('src', 'button_close.png');
});
Of course this only works as long as Google uses this file location.
button.gm-ui-hover-effect {
background: url(your-img.png) !important;
background-size: contain !important;
}
button.gm-ui-hover-effect img {
display: none !important;
}
Using what Dimitrije Djekanovic and Grant suggested, here is a working version for the current API version 3.49 (Mid-May of 2022):
/* hides the x image */
button.gm-ui-hover-effect > span {
display: none !important;
}
/* inserts the customized and clickable image instead */
button.gm-ui-hover-effect {
opacity: 1 !important;
background: url('close.svg') center center !important;
background-repeat: no-repeat !important;
background-size: 16px 16px !important;
/* above is a good size or uncomment the next line */
/* background-size: contain !important; */
}
To test this, go to the StackBlitz demo provided by the official documentation and paste the style.css file while having background changed to:
background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Mr._Smiley_Face.svg/414px-Mr._Smiley_Face.svg.png')
center center !important;
There isn't really a way to do this. Your best bet would probably be to use a third-party or custom Infowindow.
There's a list of some third-party solutions here.
To replace with (or whatever image you might like), after
infowindow.open(map, marker);
you can try to add these lines
$('img[src="http://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif"]').each(function() {
$(this).attr('width', 14);
$(this).attr('height', 13);
$(this).css({width: '14px',height: '13px'});
$(this).attr('src','http://www.google.com/intl/en_us/mapfiles/close.gif');
});

Resources