Why does Chrome incorrectly determine page is in a different language and offer to translate?

Update: according to Google We don’t use any code-level language information such as lang attributes. They recommend you make it obvious what your site’s language is. Use the following which seems to help although Content-Language is deprecated and Google says they ignore lang <html lang=”en” xml:lang=”en” xmlns= “http://www.w3.org/1999/xhtml”> <meta charset=”UTF-8″> <meta name=”google” content=”notranslate”> <meta http-equiv=”Content-Language” … Read more

How do I add a margin between bootstrap columns without wrapping [duplicate]

You should work with padding on the inner container rather than with margin. Try this! HTML <div class=”row info-panel”> <div class=”col-md-4″ id=”server_1″> <div class=”server-action-menu”> Server 1 </div> </div> </div> CSS .server-action-menu { background-color: transparent; background-image: linear-gradient(to bottom, rgba(30, 87, 153, 0.2) 0%, rgba(125, 185, 232, 0) 100%); background-repeat: repeat; border-radius:10px; padding: 5px; }

How do I return a proper success/error message for JQuery .ajax() using PHP?

You need to provide the right content type if you’re using JSON dataType. Before echo-ing the json, put the correct header. <?php header(‘Content-type: application/json’); echo json_encode($response_array); ?> Additional fix, you should check whether the query succeed or not. if(mysql_query($query)){ $response_array[‘status’] = ‘success’; }else { $response_array[‘status’] = ‘error’; } On the client side: success: function(data) { … Read more

Remove ‘:hover’ CSS behavior from element

One method to do this is to add: pointer-events: none; to the element, you want to disable hover on. (Note: this also disables javascript events on that element too, click events will actually fall through to the element behind ). Browser Support ( 98.12% as of Jan 1, 2021 ) This seems to be much … Read more

html5 video tag codecs attribute

The codecs parameter is specified by RFC 6381. Specifically, see section 3.3 for the meaning of avc1 and mp4a values. In the case of avc1.4D401E, avc1 indicates H.264 video, and this is followed by a dot and three 2-digit hexadecimal numbers defined by the H.264 standard: profile_idc the byte containing the constraint_set flags (currently constraint_set0_flag … Read more

Two Divs next to each other, that then stack with responsive change

You can use CSS3 media query for this. Write like this: CSS .wrapper { border : 2px solid #000; overflow:hidden; } .wrapper div { min-height: 200px; padding: 10px; } #one { background-color: gray; float:left; margin-right:20px; width:140px; border-right:2px solid #000; } #two { background-color: white; overflow:hidden; margin:10px; border:2px dashed #ccc; min-height:170px; } @media screen and (max-width: … Read more

Create a simple 10 second countdown

JavaScript has built in to it a function called setInterval, which takes two arguments – a function, callback and an integer, timeout. When called, setInterval will call the function you give it every timeout milliseconds. For example, if you wanted to make an alert window every 500 milliseconds, you could do something like this. function … Read more