• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4794
  • Last Modified:

CSS Background overflow

Can a CSS background be defined to overflow it's container? How? Thanks :)
0
shantelechy
Asked:
shantelechy
  • 2
  • 2
1 Solution
 
GrandSchtroumpfCommented:
No, a CSS background cannot be defined to overflow it's container.
0
 
DaydreamsCommented:
What about overflow: visible;

http://www.w3schools.com/css/pr_pos_overflow.asp

"The content is not clipped. It renders outside the element"

Yes, it can overflow.
0
 
DaydreamsCommented:
Grand is right.. background does not seem to overflow, but content does if the value is "visible"
0
 
shantelechyAuthor Commented:
Thank you, so the solution appears to be make the image 'content' and position the text to appear on top.
0
 
GrandSchtroumpfCommented:
yes, that's a possible solution.
another solution is to set the size of your container, but it has its incovenients too.
the basic idea is to separate content from presentation.
if your image is part of the content (like the image of your product), then place it in the html.
if it's presentation (like a rounded border effect), then place it in the CSS.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now