Saturday 29 June 2013

// // Leave a Comment

How to change or add html codes background color,background image,Fixed Background image, shorthand background code and backgrounds for the whole page

Hey guys now we know how to change background color with html elements.
The following examples use is CSS(Cascading style sheet).CSS is the best way for setting background.It's better than all other outdated methods.
You have only add this in your blogger by following ways :
  • Blogger>Layout
  • Html/Javascript
  • and paste the following codes inside which is given below.
Background color:
<div style="background-color:yellow;border:1px solid black;padding:10px;">
<p>HTML background code is limited, CSS background code is much better!</p>

</div>
example:

Background image:
<div style="background-image:url(/pix/smile.gif);
background-repeat:repeat;
width:200px;
height:200px;">
<p>HTML background code is limited, CSS background code is much better!</p>
</div>
Fixed Background Image:

<div style="background-image:url(/pix/smile.gif);
background-repeat:repeat;
background-attachment:fixed;
overflow:scroll;
width:200px;
height:100px;">
<p>HTML background code is limited, CSS background code is much better!
example shows how a background image can be set to a fixed position
- even though its containing block scrolls.</p>
</div>
Shorthand Background code:

<div style="background:url(/pix/smile.gif) repeat fixed;
overflow:scroll;
width:200px;
height:100px;">
<p>HTML background code is limited, CSS background code is much better!
example shows how a background image can be set to a fixed position
- even though its containing block scrolls.</p>
</div>



0 Peoples tell for us:

Post a Comment

Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.
Note:
1. Make sure to click the "Subscribe By Email" link below the comment to be notified of follow up comments and replies.
2. Please "Do Not Spam" - Spam comments will be deleted immediately upon our review.
3. Please "Do Not Add Links" to the body of your comment as they will not be published.
4. Only "English" comments shall be approved.
5. If you have a problem check first the comments, maybe you will find the solution there.