Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

background-size width only

Tags:

css

width

image

I have made a full screen slide show on a web page I am making, but as a entry page after they are 'done' with the slide show..I want to put a picture on top with the width expanding to full size in width after the resolution to the user. While the height is gonna be static..like 600px.

Is there a way to do this? With CSS or something? I am new to CSS and after googling for many days I havent found any decent example of what I am trying to make

I do not have any example ready of what I am trying to archieve, but hopefully someone will have a idea of what I am trying to do.

Thanks in advance

like image 654
tbrueland Avatar asked Apr 19 '26 04:04

tbrueland


1 Answers

You can set two different values in background-size:

.yourimg {
      background-image: url('yourimghere.jpg');
      background-size: 100% 600px;
}
like image 112
Anthony Valera Avatar answered Apr 21 '26 21:04

Anthony Valera



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!