Hidden features of HTML

Using a protocol-independent absolute path: <img src=”//domain.example/img/logo.png”/> If the browser is viewing an page in SSL through HTTPS, then it’ll request that asset with the HTTPS protocol, otherwise it’ll request it with HTTP. This prevents that awful “This Page Contains Both Secure and Non-Secure Items” error message in IE, keeping all your asset requests within … Read more

How to convert unordered list into nicely styled dropdown using jquery?

$(function() { $(‘ul.selectdropdown’).each(function() { var $select = $(‘<select />’); $(this).find(‘a’).each(function() { var $option = $(‘<option />’); $option.attr(‘value’, $(this).attr(‘href’)).html($(this).html()); $select.append($option); }); $(this).replaceWith($select); }); }); EDIT As with any jQuery code you want to run on page load, you have to wrap it inside $(document).ready(function() { … }); block, or inside it’s shorter version $(function() { … … Read more

How to make div occupy remaining height?

Use absolute positioning: #div1{ width: 100%; height: 50px; background-color:red;/*Development Only*/ } #div2{ width: 100%; position: absolute; top: 50px; bottom: 0; background-color:blue;/*Development Only*/ } <div id=”div1″></div> <div id=”div2″></div>

casinojojobetpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişholiganbetholiganbet girişholiganbet güncel giriş