English

How would you define a background image which would be displayed filling only the top of the screen?

Advertisements
Advertisements

Question

How would you define a background image which would be displayed filling only the top of the screen?

Code Writing
Definition
Advertisements

Solution

After setting the background-repeat property’s "repeat-x" value, which indicates that the background will only be repeated horizontally, we must place the image in the top left corner of the page.

body { background: url(logo.gif) repeat-x fixed left top; }
shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Cascading Style Sheets (CSS) - Assisted Practice [Page 273]

APPEARS IN

Sumita Arora Computer Applications [English] Class 10
Chapter 6 Cascading Style Sheets (CSS)
Assisted Practice | Q 6. | Page 273
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×