0

Hi,


Can you help me please, I am just a beginner in making website..my problem is when i use the ctrl+mouse scroll just like when you zoom-in or zoom-out your webpage, my webpage will be destroyed the background of my website will go to left side if i will zoom-in or zoom-out...here is the code

.samplebody{
	  background:url('images/port1.jpg');
	  background-size:1024px;
	  background-repeat:no-repeat;
	} 

 .samplediv{
           border:2px ridge;
	   border-radius:15px;
	   width:auto;
	   height:auto;	      	
   }

please help me.Thank you in advance and I'm hoping for your positive response.

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jemz
0

Delete this row:

background-size:1024px;

Thank you for the reply sir,,, I tried it to remved but my background picture turns back to it's original size...could not occupy the whole background of my page....please help me sir thank you in advance and I'm hoping for your positive response.

0

You cannot control background size with CSS. Apparently, your problem kinda looks like position problem.

.samplebody{
	  background:url('images/port1.jpg');
	  background-size:1024px;
	  background-repeat:no-repeat;
          background-position: top center; /* Adjust the position yourself */
	}

Hope this help.

0

You cannot control background size with CSS. Apparently, your problem kinda looks like position problem.

.samplebody{
	  background:url('images/port1.jpg');
	  background-size:1024px;
	  background-repeat:no-repeat;
          background-position: top center; /* Adjust the position yourself */
	}

Hope this help.

Hello sir, Thank you for the reply...Okay i will try this sir and i will write again if i have doubt.more power to you always...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.