Skip to main content

Better Css Writen Techniques

  • If you can write css better than first select editor.
    The best editor is Dreamweaver and net beans.
    You can find the better than it.
    I just tell you because it is provide old declared class name so, you can easily give different name.
  • Let’s start, first given the comment of any css file and provide information of css file like (name, version etc).
    Each apply css on html elements than create group of element and give the comment of that like following header element comment is:

         /* Header Element */

  • If you have any kind of css file can import then import the file.
    Finally, put the code but first class name and id name define curly bracket “ { } ” can start at that line just like follow:

         .Demo #Work {
              Margin: 0px;
         }

  • If you can apply same code more than one or two classes and id or tags than after separate put in the next line like follow:

         .Demo #work,
         .Test > p {
             Margin: 0px;
         }

  • Whenever you can put four pixel( four pixel means top, left, bottom, right ) or any value If top and bottom value is same and left and right value is same than give as follow:

         <attribute name>:0px 0px;


    First pixel indicates top and bottom values
    Second pixel indicates left and right values
  • If you can apply same value of four pixel than given as follow:

         <attribute name>:0px;
    Css can given the separate code like under
         <attribute name>
         <attribute name>-right:0px;
         <attribute name>-left:0px;
         <attribute name>-bottm:0px;

    It is only use when give separately attributes otherwise not given
  • If you can apply more than 5-6 of each tag than attribute write a group and each group separate with one line space. Like follow :

          .Demo {
              Margin: 0px;
              Padding: 0px;
              Width: 0px;
              Height: 0px;

              Background-color: #000;
              Color: #fff;

              Cursor: pointer;
              Z-index: 300;
          }

  • And two tag attribute you can also give one line space to separate it. Like

          .Demo {
              Margin: 0px;
          }

          .work {
              Margin:20px;
          }

Post a Comment

Popular posts from this blog

My new Jquery Plugin name is krDailog

This is my new jquery plugin i hope this is use full to you if you require this plugin than contact me

 /*
    krDailog Version 1.0
    Author: krButani
    email: butanikartik1108@gmail.com
*/


Require to use this function
    - bootstrap.css new version
    - bootstrap.js new version
    - jquery.js new version
    - jquery-ui.js new version
    - glyphicons font by bootstrap

# you can use new version of all and also use min file also

# include file first this way

    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/krDailog.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <s…

Intent demo pass with text demo in Android

First Create Two acitvity layout file name firstscreen.xml second_screen.xml java filename FirstScreen.java SecondScreen.javafirstscreen.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/firstscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.krbutani.intentpasswithdatademo.Firstscreen">

<Button
android:text="Goto Second"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignPare…