- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello everyone,
I am using box-shadow to mimic an inset border for a series of divs. The problem is the box-shadow doubles in pixels at the top/bottom of each div because they are stacked.
Is there a way to perhaps cut the top/bottom border dimension in half…so when stacked it equals the left/right?
**Example:**
http://tinker.io/6f2b5
_Note: if anyone has a better approach for accomplishing an inset border…I’m all ears._
Thanks
If you use:
box-sizing: border box;
then your padding and borders will not exceed the limits of your overall dimensions.
I made some adjustments:
how about adding something like this:
div~div {
margin-top: -20px;
}
> Still doesn’t correct anything. I think the problem now depends on the display: table
works for me…