![]() |
Repeating background vertical image with top padding?
I have a container 969px wide that should have left and right shadow images (each 27px wide for a total container width of 1023px).
My problem is that I don't want the shadows on the left and right to start until about 30pixels down from the top of the container. My guess is that I need to create another container 30px down just for the shadows. But I'm wondering if I could use the shadows on the entire container and add top padding to the shadow images, but not add top padding to the container itself? Is there a way to do this? I suspect there is and I'm making it harder, but I wanted to throw it out there for the masses. Thanks! |
Why didn't you just try it? Without code I'm guessing, but yes using top padding OR top margin on the two shadows will force them to start further down than the container.
|
Quote:
|
Hello loamguy1,
If your shadow is an actual image that you using as a background you can easily position that. If your shadow is CSS created, neither margin or padding will move it down. Look at it like this once - Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
You will not needs to be take 2 div. use this method.
#IDName {background-image: 50px center imgname here} |
Quote:
|
Quote:
The shadow image is an actual png image, 27w x 5h. Once I go back to work tomorrow I'm going to try this out and post some code if I'm still stuck (which is probably likely, lol). |
Code posted below:
Please note the "top" div is inside the "main-container" div which is inside the "shadow-container" divs. And it is the "top" div I'd like to remove the shadow borders from. Code:
body { |
It's a lot easier if you post your entire code so we don't have to guess what you're doing with your markup. That CSS seems to work, with a few changes...
Code:
<!doctype html> |
| All times are GMT +1. The time now is 03:38 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.