Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to set background image in web page  (Read 4641 times)

0 Members and 1 Guest are viewing this topic.

Love Aajkal

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 7
    How to set background image in web page
    « on: April 18, 2014, 01:46:29 AM »
    hey friends, i am trying set a small image in my web site. But that image is small[size: 280 x 177 px] but i want to set that small image in my background. it will be set at whole bg...can you help  me how to set??? waiting....

    kashyapdaksh99



      Newbie

      • Experience: Beginner
      • OS: Windows 7
      Re: How to set background image in web page
      « Reply #1 on: April 18, 2014, 02:50:45 AM »
      Use
      <html>
      <body backgroung="Your Image Source">
      //your content


      </body>
      </html>

      Love Aajkal

        Topic Starter


        Newbie

        • Experience: Beginner
        • OS: Windows 7
        Re: How to set background image in web page
        « Reply #2 on: April 18, 2014, 03:04:47 AM »
        In that case image will display in repeated x and y format not in whole bg
         

        camerongray



          Expert
        • Thanked: 306
          • Yes
          • Cameron Gray - The Random Rambings of a Computer Geek
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Mac OS
        Re: How to set background image in web page
        « Reply #3 on: April 18, 2014, 06:01:37 AM »
        If you have an image that small, you really shouldn't be stretching it to fill the entire page, just image how horrible a 280x177 image will look on an average laptop at 1366x768 or even on some machines at 2560x1440 -You'll be able to see the individual pixels!

        If you really want to do this bearing in mind how bad it will look, you can use the CSS3 background-size property: http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_background-size2.

        Nowadays you should be using CSS for all of your styling, using inline tags like '<body background="foobar.jpg">', '<font face="verdana" color="green">' and '<p align="center">' is very old fashioned and considered old practice, not to mention the very limited control it gives you over your styling.

        jormeno



          Rookie

          Thanked: 1
          • Experience: Familiar
          • OS: Windows 7
          Re: How to set background image in web page
          « Reply #4 on: April 24, 2014, 12:26:20 PM »
          Yes using CSS is the way to go
          You won't know unless you try.