Posts

Showing posts from March, 2014

Cut ONE Corner of div Using CSS

When we want to create the div with one edge is cut with the help of only CSS, following code does that. HTML Code: <div></div> CSS Code: div {     height: 300px;     background: red;     position: relative; } div:before {     content: '';     position: absolute;     top: 0; right: 0;     border-top: 80px solid white;     border-left: 80px solid red;     width: 0; } Above example shows the corner at top left of div. We can have any corner cut by little tweaking above code. Example: div {     height: 300px;     background: red;     position: relative; } div:before {     content: '';     position: absolute;     top: 220px; right: 0;     border-bottom: 80px solid white;     border-left: 80px solid red;     width: 0; } Above code show the corner at bottom of the div. Source:  http://stackoverflow.com/questions/7324722/cut-corners-using-css

Youtube z-index IE issue fix

If you have a YouTube video embedded within your web page that ignores the z-index of fixed or absolutely positioned DIV elements then here is both the html and the JavaScript (jquery) fix. Instead of embedding the youtube iframe like this <iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/lzQgAR_J1PI" frameborder="0" wmode="Opaque"> add ?wmode=transparent to the embedded link like this: Add wmode to fix youtube iframe zindex <iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/lzQgAR_J1PI?wmode=transparent" frameborder="0" wmode="Opaque"> Or, add the following Jquery javascript youtube iframe z-index fix: Add wmode to fix youtube iframe zindex $(document).ready(function(){     $('iframe').each(function(){           var url = $(this).attr("