Can I change the checkbox size using CSS?

It’s a little ugly (due to the scaling up), but it works on most newer browsers: input[type=checkbox] { /* Double-sized Checkboxes */ -ms-transform: scale(2); /* IE */ -moz-transform: scale(2); /* FF */ -webkit-transform: scale(2); /* Safari and Chrome */ -o-transform: scale(2); /* Opera */ transform: scale(2); padding: 10px; } /* Might want to wrap a … Read more

How to open link in a new tab in HTML?

Set the target attribute of the link to _blank: <a href=”#” target=”_blank” rel=”noopener noreferrer”>Link</a> For other examples, see here: http://www.w3schools.com/tags/att_a_target.asp Note I previously suggested blank instead of _blank because, if used, it’ll open a new tab and then use the same tab if the link is clicked again. However, this is only because, as GolezTrol … Read more

Prevent Bootstrap Modal from disappearing when clicking outside or pressing escape? [duplicate]

If using JavaScript then: $(‘#myModal’).modal({ backdrop: ‘static’, keyboard: false }) in case of ‘show’ $(‘#myModal’).modal({backdrop: ‘static’, keyboard: false}, ‘show’); or in HTML: <a data-controls-modal=”your_div_id” data-backdrop=”static” data-keyboard=”false” href=”#”>

Using .otf fonts on web browsers

You can implement your OTF font using @font-face like: @font-face { font-family: GraublauWeb; src: url(“path/GraublauWeb.otf”) format(“opentype”); } @font-face { font-family: GraublauWeb; font-weight: bold; src: url(“path/GraublauWebBold.otf”) format(“opentype”); } // Edit: OTF now works in most browsers, see comments However if you want to support a wide variety of browsers i would recommend you to switch to … Read more

How to trigger a phone call when clicking a link in a web page on mobile phone

Most modern devices support the tel: scheme. So use <a href=”tel:555-555-5555″>555-555-5555</a> and you should be good to go. If you want to use it for an image, the <a> tag can handle the <img/> placed in it just like other normal situations with : <a href=”tel:555-555-5555″><img src=”path/to/phone/icon.jpg” alt=”Call 555-555-5555″ /></a>

How to add some non-standard font to a website?

This could be done via CSS: <style type=”text/css”> @font-face { font-family: “My Custom Font”; src: url(http://www.example.org/mycustomfont.ttf) format(“truetype”); } p.customfont { font-family: “My Custom Font”, Verdana, Tahoma; } </style> <p class=”customfont”>Hello world!</p> It is supported for all of the regular browsers if you use TrueType-Fonts (TTF), the Web Open Font Format (WOFF) or Embedded Opentype (EOT).

Center image using text-align center?

That will not work as the text-align property applies to block containers, not inline elements, and img is an inline element. See the W3C specification. Use this instead: img.center { display: block; margin: 0 auto; } <div style=”border: 1px solid black;”> <img class=”center” src =”https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png?v=c78bd457575a”> </div>