Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background in .css stretches

Tags:

css

My background image is supposed to stay in it's fixed dimensions and it does, when I'm working in dreamweaver or opening it from my desktop via various browsers (mozilla, ie, chrome). But once it's uploaded the background image stretches. Does someone know a solution for this issue?

Website

like image 562
user1796760 Avatar asked Dec 06 '25 12:12

user1796760


2 Answers

Try setting this in your CSS...

body {
  background:url(YOUR_IMAGE);
  background-size:80px 60px;
  background-repeat:no-repeat;
}

Where the size in pixels is the same as the original image dimensions.

like image 185
Matt Olan Avatar answered Dec 08 '25 06:12

Matt Olan


body {
  background:url(YOUR_IMAGE);
  background-repeat:no-repeat;
}

Try this

like image 27
Prem86 Avatar answered Dec 08 '25 04:12

Prem86



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!