Ask Your Question
1

How can I make my background image appear full screen without it splitting the head of the image even though it is not responsive?

asked 2022-04-01 11:00:00 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-06-10 17:00:00 +0000

devzero gravatar image

If your background image is not responsive, you can use CSS to center and cover the entire screen with the image.

Here's an example:

body {
  background: url("your-image.jpg") no-repeat center center fixed;
  background-size: cover;
}

This CSS code will center the image horizontally and vertically, and cover the entire screen while maintaining the aspect ratio of the image. The fixed keyword in background-attachment property makes the background image fixed while the rest of the page scrolls.

You can adjust the background-size property to make the image bigger or smaller depending on your preference.

Keep in mind, this method may not work for all devices and screen sizes due to the aspect ratio of the image. In this case, you may need to make the image responsive or use a different background image with a different aspect ratio.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-04-01 11:00:00 +0000

Seen: 11 times

Last updated: Jun 10 '21