Search code examples
cssborder

CSS div border with offset


How can I make a div's side (left/right) border start lower than it's actual size? I know I can reduce it's height and then add a margin-top, but I don't want that. Is it possible to simply lower down the starting point of the border?

__________

|
|
|

Solution

  • You can only do this by omitting the top border and either

    • adding a top margin to the bottom element or
    • adding a bottom margin to the top element