image in division
-
how to display image on division i have code as follows
but no image is getting displayed on division...wts going wrong please help me out of it.
-
how to display image on division i have code as follows
but no image is getting displayed on division...wts going wrong please help me out of it.
Member 11919722 wrote:
background-image:url('C:\Users\admin\Desktop\imag\cutis.jpg');
You've specified a local path for the image. That will only work if you load the HTML file from a local path. When you load the file from a website, the browser will not allow you to try to load images from the client's local system. You need to put the image in a folder on your site, and use a proper URL to reference it:
background-image:url('path/to/your/image.jpg');
You can either use a full URL:
https://www.yoursite.com/path/to/your/image.jpg
Or an absolute path on your site:/path/to/your/image.jpg
Or a path relative to the file where the CSS style is declared:../../path/to/your/image.jpg
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Member 11919722 wrote:
background-image:url('C:\Users\admin\Desktop\imag\cutis.jpg');
You've specified a local path for the image. That will only work if you load the HTML file from a local path. When you load the file from a website, the browser will not allow you to try to load images from the client's local system. You need to put the image in a folder on your site, and use a proper URL to reference it:
background-image:url('path/to/your/image.jpg');
You can either use a full URL:
https://www.yoursite.com/path/to/your/image.jpg
Or an absolute path on your site:/path/to/your/image.jpg
Or a path relative to the file where the CSS style is declared:../../path/to/your/image.jpg
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
thanks for the response but even after inserting an image to my asp.net application m not able to see image on division i did following changes in my code is that correct if not then plz tell where m doing wrong.
Thanks
-
Member 11919722 wrote:
background-image:url('C:\Users\admin\Desktop\imag\cutis.jpg');
You've specified a local path for the image. That will only work if you load the HTML file from a local path. When you load the file from a website, the browser will not allow you to try to load images from the client's local system. You need to put the image in a folder on your site, and use a proper URL to reference it:
background-image:url('path/to/your/image.jpg');
You can either use a full URL:
https://www.yoursite.com/path/to/your/image.jpg
Or an absolute path on your site:/path/to/your/image.jpg
Or a path relative to the file where the CSS style is declared:../../path/to/your/image.jpg
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
i got image to be displayed but i want only one image to be displayed in division but its dislaying same image on divison multiple times?
-
i got image to be displayed but i want only one image to be displayed in division but its dislaying same image on divison multiple times?
Sounds like you need to add
background-repeat: no-repeat;
to the styles. CSS background-repeat Property | W3Schools[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer