Cory's profile picture

Published by

published
updated

Category: Art and Photography

🖥 CSS Snippet: Adding a Banner To Your Profile

If you want to add a banner to your profile, above your profile, here's an easy way to do it. I've also included a way to make it look great on mobile. For whatever image you use, adjust the height tags until it looks nice. 



Remember: always put any CSS in between two Style tags: <style></style> That way, browsers will recognize that what you're trying to do is adjust the style. Also remember that CSS stands for Cascading Style Sheets, so the browser will activate styles from top to bottom!

main:before {
width: 100%;
height: 300px;
display: block;
content: "";
background-image: url('https://via.placeholder.com/1280x720.png');
background-position: center center;
background-size: cover;
}
@media only screen and (max-width: 600px) {
main:before{
height: 200px;
}
}


170 Kudos

Comments

Displaying 20 of 29 comments ( View all | Add Comment )

earth angel

earth angel's profile picture

im not experienced in making/using codes, where do i put what??


Report Comment



also everytime i try to insert an image link it doesnt work, the code just doesnt work or put anything on my profile other than the visible code in my about me

by earth angel; ; Report

i hope this is not to late
but
u put it in ur about me or even in the who id like to meet section
either one works

and maybe a reason why whatever image ur trying to put is not showing up
is cuz u gotta put the CSS in between those style tags like it says on the blog

by 🦇 𝓕𝓻𝓮𝓪𝓴𝔂 Royce ! 𖤐 🏳‍⚧; ; Report

Purplgeist

Purplgeist's profile picture

THIS RULES!!! I just put up my banner, thank you for this guide!


Report Comment

Squeezynutz

Squeezynutz's profile picture

Thank yewww :3


Report Comment

𝑺𝑪𝑳𝑷𝑻𝑼𝑹𝑬𝑺

𝑺𝑪𝑳𝑷𝑻𝑼𝑹𝑬𝑺's profile picture

yo this saved my life i was looking 4 this


Report Comment

W1LLIAM

W1LLIAM's profile picture

UZING IT, TYZM :D


Report Comment

@.Kedenye

@.Kedenye's profile picture

using <3


Report Comment

Simmone

Simmone's profile picture

Heey! I was wodnering if i could use a gif instead of an image by using this code?? Or do I have to modify it in a certain way to make the gif works? Thaaanks:)


Report Comment



u can use a gif, and no u wont have to change the code :)

by Digital★Stitches; ; Report

AXL

AXL's profile picture

how do you add multiple banners stacked vertically?


Report Comment

DANNY

DANNY's profile picture

this was so helpful! super easy to adjust the height too :D


Report Comment

Fluid Dynamic

Fluid Dynamic's profile picture

Thank you finally got my header looking better!!!


Report Comment

Sam

Sam's profile picture

Every time I try this, it makes my background gray and I cant fix it. The banner itself is fine, but the background wont change from gray


Report Comment



Do you change the image URL to your image?

by Cory ; ; Report

I did

by Sam; ; Report

александр>_<

александр>_<'s profile picture

must the picture i want to add as banner be 1280x720?


Report Comment



No it doesn’t! And you can adjust the height or even the position of the background to get the image the way you like.

by Cory ; ; Report

鶴井静則 ☆

鶴井静則 ☆'s profile picture

it dosen't work for me with the image i want.. =(


Report Comment

⠀☆⠀Vivienne

⠀☆⠀Vivienne's profile picture

Really helpful !!! Thank you


Report Comment

Elytri

Elytri's profile picture

thanks!


Report Comment

Test Profile

Test Profile's profile picture

How can I make the banner glow? like, I want to make outlines glow how do I do that... and thank you, this is very useful. :)


Report Comment

wren

wren's profile picture

THIS HELPED SO MUCHH


Report Comment

allied_almond

allied_almond's profile picture

is there a way i could put a marquee inside the banner?


Report Comment

eden :3

eden :3's profile picture

thx!!


Report Comment

kitty

kitty's profile picture

is there a way to make the banner smaller


Report Comment



change the width and the height!!! ex

width: 50%

or height: 150px

by plasticasia; ; Report