answersLogoWhite

0


Best Answer

You will need to use the url() function. For example:

background-image: url('/images/bg.png');

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you give a link for a background image using CSS?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How would you use an image as your background for HTML?

I would use a CSS style page. Place the following line in the header of the page to link to the style sheet. <link rel="stylesheet" type="text/css" href="mystyle.css" /> The style sheet takes the place of the "style" modifier within HTML tags. In order to accomplish the background image you would need to put the following in the file "mystyle.css" body{ background-image:URL('IMAGE FILE'); } The body tag tells the compiler which tag to modify. In this case it is your entire page, or body. This could be replaced with any of the standard tags in HTML. If you wanted to specify a specific id you would write: tag#id for example, a <div id='foo'></div> would be represented in the css sheet by div#foo Then, all of the style modifications within the curly braces are applied. This can do anything from text positioning, to sizing, to inserting backgrounds, etc. This information originally came from w3schools.com


What is a href code?

href is a Attribute used for the Anchor tags to link a image or line of text to a specific website here's a visual for linking a anchor to a image using and href attribute I hope this helped you understand the href attribute


How do you link an image to a PHP file?

Wrap the image tag in an anchor link <a href="mypage.php><img src="mypic.gif" width="10" height="10" /></a>


The code below that uses CSS to eliminate the default border on an image configured as an image?

If you are using an image to link to another page or site, you will want to use CSS to eliminate the border the browser will put around the image by default. To do this, in your external style sheet, add the following code: img { border: none; } This will remove the default border from around all images.


How are pictures posted to websites?

<img src="the exact location and name of the image that you are embedding.file extension"width="# in pixels or percent" height="# in pixels or percent"> for further information about web design, feel free to message me.

Related questions

How do you set an image as 100 percent of the background of a webpage using css?

There can be no design questions with trying A List Apart! See link below.


What's the code for making a background?

Get the background you want ready, then upload it to photobucket (or a site like PHotobucket) then go to these directions to learn how to get the background URL link (photobucket should have the link to your image) and then this will explain how to put the URL link into the code that works on myspace: http://profilerehab.com/help/get_myspace_background


Is there a badge for completing five SPA missions?

Yes, as a matter of fact, there is! Its background is green. Check out the link below to see an image (but DO NOT copy it).


Can you use a MySpace layout and a different background at the same time?

Yep, go to profilerehab.com and pick a myspace layout (they are the best site for myspace layouts if you ask me) and then go to this link to see where the background URL is in the myspace layout code. Take the URL link of the layout you want to use and put it into the myspace layout to replace the background from profilerehab.com. Here is a link to show how to find where the background image URL link is in the code: http://profilerehab.com/help/get_myspace_background


What is the difference between a hyperlink and hotspot?

Actually, there's not much difference. A hotspot is basically a "spot" on an image map and can be linked to whatever you want to link it to using a hyperlink. A hyperlink uses the notmal HTML link tags and can be a text or image link.


Can a tessellation be created using only regular polygons?

No. See, for example, the top image in the attached link.


Is there a picture of African American John Hanson?

Yes, you can find an image using the source link below.


How do you get your own background on Twitter?

Use any version of Photoshop to create a customized background for you Twitter page and upload it by following these steps: Go to navigation bar > Settings > Design > Upload a background image then SAVE For more details, see the attached related link.


Can you link example image of inversion in the complex plane?

Refer to the link for a image.


What is a image URL?

A image's link or the website where you found the image.


How do you create a link to a web page using an image?

it depends on what software you are using, but I know in MS Front Page, you need only right-click on the image and choose Hyperlink and you should be able to type in the URL that you want.


How do you make your picture float in the background of a MySpace page?

you may want to try pimpwebpage.com and go the link floating image and copy it into your profile and add the picture were it says image URL here it should work,good luck