Forums

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

Home Forums CSS Floating border around div Reply To: Floating border around div

#156591
noahgelman
Participant

I would be wary of woldcry911’s example in older browsers. If they don’t support the :before property you’re left with a super ugly border that’s very off-center.

Here is a slightly tweaked version that uses the nice blue background as the main widget and the border as the :before. If :before isn’t supported, you still have a nice looking widget.

EDIT: Now updated to make sure links inside are clickable. Backwards compatibility gone but screw it.

http://codepen.io/anon/pen/FDkId