[Solved] Add border using css ::after [duplicate]

There’s a lot of different ways you can achieve this effect, each with their own pros and cons (including how different properties affect document flow): Outline with negative offset .box { width: 100px; height: 100px; background-color: red; outline: 2px solid darkred; outline-offset: -7px; } <div class=”box”></div> Border and boxshadow .box { width: 100px; height: 100px; … Read more

[Solved] Determining CSS Specificity Score [duplicate]

W3C specification states: A selector’s specificity is calculated as follows: count the number of ID selectors in the selector (= a) count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b) count the number of type selectors and pseudo-elements in the selector (= c) ignore the universal selector Selectors inside … Read more

[Solved] Make a HMTL hyperlink not appear as a hyperlink

If you are using inline css you can use like this – <html> <head> <link rel=”stylesheet” type=”text/css” href=”https://stackoverflow.com/questions/44939393/style.css”> </head> <center> <div id = “indexBackgroundOne”><h2 style=”font-family:verdana;text-decoration: none;color:black;”><a href=”” style=”text-decoration: none;color:black;”> Q U E S T S &reg;</a></h2></div> </center> </html> solved Make a HMTL hyperlink not appear as a hyperlink

[Solved] How to get a div of such form that works in all browsers (IE10+)?

In order to ensure both browser compatibility AND a gradient/image background, you may find you will have to use multiple elements, as well as a pseudo element on each of the nested divs. A quick mock up can be seen below. html { background: radial-gradient(red, black); } div.wrap { height: 300px; width: 300px; position: relative; … Read more

[Solved] Use a span tag to change div background-color onclick [closed]

Using vanilla JavaScript (no libraries): //We attach a click handler on the nearest common parent. //This allows us to have only one event handler, which is better //For performance! document.getElementById(“parent”).onclick = function(e) { //We only want events on the spans, so let’s check that! if (e.target.tagName.toLowerCase() == “span”) { this.style.backgroundColor = “#BADA55”; //This is for … Read more

[Solved] css box with two different shapes

This is an answer based off of the one by damien hawks. I have included some jQuery so that both shapes change color on hover. You can adapt this to be closer to the code you had provided. DEMO HTML: <div id=”rectangle” class=”hover”></div> <div id=”halfCircleBottom” class=”hover”></div> CSS: .hover { background-color: #e7f4ef; } .hovered { background-color: … Read more

[Solved] Jquery to navigate through div [closed]

Here you go. EDIT If you want to go to new page after last div just add else statement and add some attribute to send url. $(“#button”).on(‘click’, function() { var visible = $(“[id^=div]:visible”), number = parseInt(visible.attr(‘id’).substr(3)) + 1, nextDiv = $(“#div” + number); if (nextDiv.length > 0) { visible.hide(); nextDiv.show(); } else { location.href = … Read more

[Solved] Changing img src in jQuery

check to HTML <ul class=”social-media-nav-center”> <li> <a href=”https://twitter.com/” target=”_blank”><img id=”twitter” class=”small” src=”https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRgdlWvqZIB0r6qkjFS_t9uMKD9gQIVMV3fE-Vw9BMoRfNEmJG2″ /> </a> </li> </ul> Jquqey $(document).ready(function(){ $(window).scroll(function(){ if($(window).scrollTop() > $(window).height()) { $(“#twitter”).attr(“src”, “http://www.planwallpaper.com/static/images/744081-background-wallpaper.jpg”); } }) }) CSS .social-media-nav-center{height:1000px;} https://jsfiddle.net/yakcbanL/ 2 solved Changing img src in jQuery

[Solved] How to make a slider with that functionality (html, css, js) [closed]

a simple function to do some actions base on input value can be like this : document.getElementById(“myRange”).addEventListener(“change”, function (e) { let value = parseInt(this.value); let resultElm = document.getElementById(“result”); switch (true) { case 0 < value && value <= 20: resultElm.innerHTML = “:|”; break; case 20 < value && value <= 40: resultElm.innerHTML = “:)”; break; … Read more

[Solved] How to make css notifications without jQuery? [closed]

you can simply use my code to show notification. tn-box { width: 360px; padding: 25px 15px; text-align: left; border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.6); opacity: 0.9; position: fixed; top: 50px; color: #fff; background: #000; right: 15px; -ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=0.9)”; filter: alpha(opacity=0.9); cursor: default; } and after that to hide the … Read more