How to automatically adjust the width of the background in HTML ?

27th of January 2014 1

How to automatically adjust the width of the background in HTML ?

I’m working on html an i want to put image as a background so how to make it automatically adjust the width of the screen and make it repeat vertically ?!

Best answer:

Answer by Haunted
use css. note that you can also specify margin as a percentage(eg: 10%)

….. other head info

What do you think? Answer below!

Filed under § jquery plugins — Tagged with , , , ,

Share it!

Was it good for you to?

Sponsors

Support for the site!

No sponsors at the moment.



1 great comment(s) for this post

  1. Your Shadow 9:06 pm 27/01 of 2014

    100% Background Image Code:

    http://www.cssplay.co.uk/layouts/background.html

    bgStretcher jQuery Plugin Allows to Add Background Image to Page and Proportionally Resize it to Fill Entire Window Area: http://www.ajaxblender.com/bgstretcher-jquery-stretch-background-plugin.html

    To repeat vertically use: repeat-y Example:

    body {
    width: X%;
    height: Y%; /* optional */
    margin: 0 auto;
    background: #fff url(image_name.jpg) repeat-y top left scroll;
    }

    Ron

    Reply

Your opinion matters. Add it below.


Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments

Categories



Copyright jqueryui.info since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.