Jump to content

CSS background

Matduss

Hi everyone! This is something that I still have not found out how to do. I was wandering how to make your background image take the full screen and not just one part of it.

 

Example: You have a 1000x1000 image that you want to display as a background. If someone is using a screen with a smaller resolution the picture is to big but for someone using a bigger resolution the picture is too small.

 

How do you manage to make the image fit perfectly on every screen?

Link to comment
Share on other sites

Link to post
Share on other sites

stretch it or shrink it, in photoshop or microsoft paint?

Link to comment
Share on other sites

Link to post
Share on other sites

stretch it or shrink it, in photoshop or microsoft paint?

But that would only work for a certain resolution. It needs to work with all screen resolutions.

Link to comment
Share on other sites

Link to post
Share on other sites

Hi everyone! This is something that I still have not found out how to do. I was wandering how to make your background image take the full screen and not just one part of it.

 

Example: You have a 1000x1000 image that you want to display as a background. If someone is using a screen with a smaller resolution the picture is to big but for someone using a bigger resolution the picture is too small.

 

How do you manage to make the image fit perfectly on every screen?

You'll need to look at responsive design. 

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You'll need to look at responsive design. 

hate fast typers...always steal the answer 

Case: NZXT H440 CPU: i7 6700K @ 4.0 Cooler: Antec Kuhler H2O 920 Graphics Card: Zotac Mini GTX1070 Ti Motherboard: Gigabyte Z170 K3 RAM: Kingstone Fury 2x8GB Storage: Crucial P1 SSD, Seagate - Barracuda 2TB 3.5, Hitachi - Deskstar 500 3.5" PSU: Corsair Enthusiast 550W 80+ Mouse: Logitech G403 OS: Windows 10 Home 64bit  Audio: ATH-AD500X

Link to comment
Share on other sites

Link to post
Share on other sites

hate fast typers...always steal the answer 

heheheuheuheuheueheuhe  :ph34r:  :ph34r:  :ph34r:

CPU: AMD Ryzen 5 5600X | CPU Cooler: Stock AMD Cooler | Motherboard: Asus ROG STRIX B550-F GAMING (WI-FI) | RAM: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL16 | GPU: Nvidia GTX 1060 6GB Zotac Mini | Case: K280 Case | PSU: Cooler Master B600 Power supply | SSD: 1TB  | HDDs: 1x 250GB & 1x 1TB WD Blue | Monitors: 24" Acer S240HLBID + 24" Samsung  | OS: Win 10 Pro

 

Audio: Behringer Q802USB Xenyx 8 Input Mixer |  U-PHORIA UMC204HD | Behringer XM8500 Dynamic Cardioid Vocal Microphone | Sound Blaster Audigy Fx PCI-E card.

 

Home Lab:  Lenovo ThinkCenter M82 ESXi 6.7 | Lenovo M93 Tiny Exchange 2019 | TP-LINK TL-SG1024D 24-Port Gigabit | Cisco ASA 5506 firewall  | Cisco Catalyst 3750 Gigabit Switch | Cisco 2960C-LL | HP MicroServer G8 NAS | Custom built SCCM Server.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You'll need to look at responsive design. 

Ok, I will go take a look at this responsive design thing.

Link to comment
Share on other sites

Link to post
Share on other sites

hate fast typers...always steal the answer 

I feel you bro.

Link to comment
Share on other sites

Link to post
Share on other sites

if you need to modify the size of the background, maybe you're looking for the background-size property

Link to comment
Share on other sites

Link to post
Share on other sites

This should work

background-size: cover;

Wow... Your post made me remember that cover was a thing... I feel kinda stupid. Thanks for the help!  :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×