Forum Moderators: not2easy

Message Too Old, No Replies

Create 3d borders around page of articles using CSS how?

         

born2run

4:56 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi so I want to create 3d borders around links (with title) like Google Search results show up in mobile.

Here is the link of the image sample of google search results page, in mobile mode, which has a 3d border around each link/title list.

[imgur.com ]

Can anyone help me write CSS code for this structure? Thanks!

NickMNS

5:06 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need box-shadow. See details here:
[developer.mozilla.org...]

born2run

5:17 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes that's very basic.. can you give me some similar examples? Thx!

NickMNS

6:00 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes that's very basic..

It's basic because that is all there is to it. It you want rounded corners add a border-radius to your style.

If you are asking how to create the cards more generally, than the best approach will depend on how the rest of your page is laid out. Given that you seem to have little experience with CSS I would recommend that you use a framework instead that will do all this for you. Bootstrap being the most common one (free and open source built by Twitter).

Here is link to that:
[getbootstrap.com...]

The component for you specific case is:
[getbootstrap.com...]

born2run

7:45 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks, incidently on that bootstrap site I don't see card?

NickMNS

8:39 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't see card?

Neither do I, I think they call it "panel" at least that was the closest thing I could find that resembled what you wanted. To be honest, I don't use bootstrap. Most recently I use Material-ui, but it is designed to work with a node.js server and a js front-end, most commonly React.js.

There is a version for static websites called MaterializeCSS:
[materializecss.com...]

I have never used the static version and It is created and maintained by Google.

Dimitri

9:22 pm on Jul 15, 2021 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



Open the Chrome/Chromium DevTools and click on the inspect icon (the square with an arrow inside), then move the mouse over the element of the page you want, and it will show you the CSS of this element.