Jump to content
Sign in to follow this  
cerebrosys

doubt

Recommended Posts

I have just started creating a html document.. where i am setting an image as background. <body background="boat.jpg">the problem is, since the image size is less its tiled.. how to fit to the screen?? please reply as soon as possiblleThanks in Advance,Chandru

Share this post


Link to post
Share on other sites

uhm... firstly, maybe you should use css for setting background in a page

<style type="text/css">body{ background-image: url(background.gif); background-color: #000000;background-repeat: no-repeat}</style>

Put that code between <head></head> or you can put it in an external css file.The background-color property will serve as the fail safe if ever ur background image fails to load. it is advisable to do this. trust me.The background repeat property will let you specify how the background image will be repeated. here we set it to no-repeat meaning the background will not be repeated or tiled whatsoever. If your asking how to make a small background go big or increase its size, for example make a 50x50 px background appear in the screen like it was 800x600 px then i dont think it is possible. There is no property for setting background width and height.The most that you can do is use a larger image.To read more about backgrounds click this ---> http://www.w3schools.com/css/css_background.aspHope it helps! :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...