The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Cut through background image of parent div…

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #37220

    I’m playing about with a free site template PSD and creating the markup and CSS for it.

    The only bit so far I’m having trouble finding a solution for is the search bar, if you look at this snippet the search bar is “cut out” of the header background, revealing the body background pattern.

    Is there any way to do this with CSS using transparency? Obviously can’t just use the same pattern as the body background because it will move on resizing the window…

    Any help would be great.


    why can’t you use the same pattern as the body? just center both of them and they will move together upon resize.


    how would this work with a repeating pattern though?


    As @wolfcry911 said, easily you can use a pattern as the body and fix it with background-position property.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.