Write the CSS to configure a graphic named mysprite.gif to display as a backgrou
ID: 3890884 • Letter: W
Question
Write the CSS to configure a graphic named mysprite.gif to display as a background image on the left side of a hyperlink. Note that mysprite.gif contains two different images. Configure the image that is located 72 pixels from the top of the sprites.gif graphic to display. Write the CSS to configure a graphic named mysprite.gif to display as a background image on the left side of a hyperlink. Note that mysprite.gif contains two different images. Configure the image that is located 72 pixels from the top of the sprites.gif graphic to display.Explanation / Answer
You did not mention which element or container should this graphic be background image and if its is a background image then why do you want it on the left side. To make an image as background image you need a contaoner like div etc or make it a background for whole body. So suppose you have a div with class name "myDiv" then use css to make an image its background. e:g look at the html code followed by css
<div class=myDiv>
Put your contents here...
</div>
Put this css code in the style section of your page or in saperate css file
.myDiv
{
background-image: url("myspriter.gif");
}
and if you want the div to be 72 pixels from top the add one more property to above css code.
top:72px;
so your complete css will be
.myDiv
{
background-image: url("myspriter.gif");
top:72px;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.