Profile cover photo
Profile photo
Prasad G
Prasad's posts

Post has attachment
Foundation orbit slider inside reveal modal has no height
Orbit slider inside foundation reveal modal sets height 0 some reason. Here is the simple way to fix that issue: $(document).on('opened.fndtn.reveal', '[data-reveal]', function(){

Post has attachment
Foundation data orbit open specific slide on load
Here is the simple way to open the the particular slide on page load: $ = true;
$ = false; Above code will first disable the jquery effects & then triggers the particular slide and then ena...

Post has attachment
How to add different styles to last row of css grid layouts
Here is the simple way to add different styles for last row elements of css grid layout. li:nth-child(Xn):nth-last-child(-n+Y) ~ li {
} X is the no.of columns in the grid and Y is the (no.of columns+1) For example, we have 3 column grid layout with border b...

Post has attachment
get url parameters and values using jquery
Here is the simple method to get url parameters & values using jquery. function getUrlParams() {
var url = document.location.href;
var params = {},hash;
var params_arr = url.slice(url.indexOf('?') + 1).split('&');
for(var i=0; i < params_ar...

Post has attachment
How to remove index.php from codeigniter url?
Codeigniter defaultly add index.php in the url because that file is responsible for processing all requests to the system. But, we can easily remove index.php by using URL Rewriting . Here are the simple steps: 1. Update general configuration: Open config.p...

Post has attachment
Horizontal line with text in the middle using CSS
Here is the simple example to create horizontal line with text in the middle. The line is created by setting a border-bottom on the containing h2 then giving the h2 a smaller line-height. The text is then put in a nested span with a non-transparent backgrou...

Post has attachment
PX to EM to PT Conversion
Here is the list of px to em conversions. These conversions are based on 16px browser default size. PX EM Percent Points 5px 0.3125em 31.25% 4pt 6px 0.375em 37.5% 5pt 7px 0.438em 43.8% 5pt 8px 0.500em 50.0% 6pt 9px 0.563em 56.3% 7pt 10px 0.625em 62.5% 8pt 1...

Post has attachment
CSS Triangle
Here are the simple example of css triangles: Note: Before writing CSS, first create div tag with class 'triangle'. <div class="triangle"></div> Triangle Up: .triangle{
width: 0px;
height: 0px;
border-left: 50px solid transparent;
border-right: 50px...

Post has attachment
How to maintain aspect ratio when resizing a DIV?
You can create containers that maintain a constant aspect ratio by using padding-bottom as a percentage. The CSS specifications says that padding-bottom is defined relative to the "width", not height, so if you want a 4:3 aspect ratio container you can do s...

Post has attachment
Change console.log display(color/font/background color)
You can apply your own styling to log message, by prefixing the message with %c , and provide the css styles as second parameter to the log message. Here is the simple example: console.log("%cThis is green color text", "color: green;"); Here is the output: ...
Wait while more posts are being loaded