Jump to content

part of image in background


mahdi_20

Recommended Posts

You can't really do that. The way repeat-x works is that when it comes to the edge of the image (not the viewport), the image repeats. The way partial background images work is that you set a width and height and position to the element in which the background image is placed, meaning you can only see the part of the image that is that height, width, and position. If you repeat it, you can't see the repeat, because the viewport is smaller than the image, and the image repeats only when it comes to the end of the image.

 

If you want to repeat something across x, then you need to get that image alone (it can't be part of another image, and set the height and width of the viewport to be wider than the image. Then have the image repeat. Since the image repeats when it gets to the edge of the image, and the image is smaller than the viewport, the image repeats until it gets to the edge of the viewport.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.