Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

box shadow on all 4 sides

Featured Replies

Hi

 

Does anyone know how to apply a box shadow around all 4 corners of the div?

 

I'm using

 

-moz-box-shadow:inset 5px 5px 10px #ccc;
-webkit-box-shadow:inset 5px 5px 10px #ccc;
box-shadow:inset 5px 5px 5px #ccc;

 

but it's only applying shadow to 2 sides.

  • 3 years later...

Box shadow:

box-shadow: 5px 5px 4px 3px red;

The first two parameters are your X and Y offset, so if you leave them at zero the shadow will spread out from all four corners. The second two are for the radius and blur radius of the shadow. You can add in multiple box shadows by comma separating them:

box shadow: 1px 1px 3px 3px red, 10px 4px 5px 0 blue;

Oh and don't forget your vendor prefixes (or even smarter us a tool such as auto prefix with grunt to do these for you :)

Edited by rbrtsmith

  • 1 month later...

use this code for box shadow with rounded corner.

.input {
-webkit-box-shadow: 0 0 5px 2px #fff;
-moz-box-shadow: 0 0 5px 2px #fff;
box-shadow: 0 0 5px 2px #fff;
}

Edited by Veeramanikandan

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.