Be careful when adding Comment to your code in CSS

3 Sep

Why,

Because,I have spent a full day with the small mess.

The small mistake in CSS Kills my Productivity (God! I got the solution and I am here sharing my experience so you won’t to that mistake).

What I did?

  • CSS works perfectly in IE when I use the below code
<!- - This is my Commnet - ->

body {background-color:red;}

#my_id { background-color:green;}
  • But in Firefox the next line of style below the comment won’t work

Say, I have added comments in each CSS files like this.


<!- - This is my Commnet - ->

body {background-color:red;}

#my_id { background-color:green;}

Where the body {background-color:red;} not seems to be working, at first I am too confused …after long battle zzzzz… I found the solution friends!.

The Solution is

  • We have to write comments as follows.

/*Comment Line*/

body{ background-color : red;}

To Conclude, IE and other Browsers accepts this comment format<!- – comment- ->,but the correct format to comment is /*Comment Line*/


<!- - This is my Commnet - ->

body {background-color:red;}

#my_id { background-color:green;}

Suggestion: Please stick with the CSS basics, mainly we developers are keen in coding where we work with major CMSs like WordPress, Joomla, than the design.So we are not spending time to learn and remember the very basics.

How to Integate Pagination in WordPress without Plugins

30 Aug

How to Integate Pagination in WordPress without Plugins

Many of us will be in this situation, where we have to split the content into multiple pages for better accessibility. Luckily wordpress supports pagination concept and we can implement it on the fly using this simple code below

<?php next_posts_link('&laquo; Older Entries') ?><?php previous_posts_link('Newer Entries &raquo;') ?>

Where in recent days we used to see paginations with numbers, below are few beautiful examples.

Read More

Adding Avatar to WordPress Default

24 Aug

Adding Avatar to WordPress Default

Introduction

In WordPress, there is a nice solution via a hook, which enables to add an avatar in the list of your backend and to make a selection to our own styled avatar. In the following section I like to show a simple code snippet which explains how to add new avatar to the array of WordPress.

You have to add the snippet shown in the screenshot to functions.php of your theme and it will add Avatar from your images folder of your theme directory.

When the theme becomes active, you will have two new Avatars available in your list.


#adding our own avatar

function own_gravatar($avata_defaults) {

$my_avatar = get_bloginfo('template_directory').'images/our_gravatar.jpg';

$avatar_defaluts[$my_avatar]="Our Avatar name";

return $avatar_defaults;

}

add_filters('avatar_defaults','own_gravatar');

How to do

own_gravatar() function provides the location of the image which is in the images folder of the WP installation directory and assigns a name Our Avatar name to it. And finally the output is sent back to default avatars (avatar_default) which displays the gravatar in the default gravatar list in the dashboard.

Now go to your Dashboard->Setting->Discussion. Scroll down the page and select your new default gravatar. And you are done.

You can customize the look’ by editing the style properties for gravatar class in the style.css file.


30 Beautifully Designed Navigation Menus

7 Jul

30 Beautifully Designed Navigation Menus

Better designs are always created an inspiration of something. It may be the nature, arts, technology or even other designs. Pictures of beautifully designed navigation menus are shown here. We can take inspiration from these designs and create our own.

Read More

Download Premium for Free WordPress Theme with PSD – Blogsrain Giveaway

6 Jul

Download Premium for Free WordPress Theme with PSD – Blogsrain Giveaway

Hello everyone, We are very glad to step into the world of  blogs, Our aim is to provide useful informations,beautiful inspirations,friendly tutorials,Free Design resources.news on  latest web trends for web developers and web designers, SEO geeks , Bloggers.

We are happy to invite you all with our Free Gift –  a very useful and completely packed premium WordPress theme.

Feel free to download  & use the theme in any of your projects also  for distribution purposes, with link back to our site.

Read More