0
Background image using css isnt working
I'm linking my stylesheet using CSS the correct way... and my CSS seems fine but my image isn't showing up on my page. What is it that I could be doing wrong??? HTML <head> <link href="../../Desktop/MyPortalPage/styles.css" rel="stylesheet" type="text/css"> </head> CSS @charset "utf-8"; /***** body CSS *****/ body{ background-image: image("BRIDGE3.jpg"); background-repeat: no-repeat; }
8 ответов
+ 5
background-image: url("../images(for exmp)/yourImage.jpg");
+ 5
i think in link tag you cant use "../../"
+ 5
without first slash in link tag, in url if the image is in the current folder use just url("image"), otherwise use "../image"
+ 1
im not sure but i think it should be:
body{
background-image: url("BRIDGE3.jpg");
background-repeat: no-repeat;
}
+ 1
ok I will try that... Happy new year by the way!
0
I tried to use url() as well... it still didnt work. What else could be the problem???
0
<link href="/Desktop/MyPortalPage/styles.css" rel="stylesheet" type="text/css">
still no differences... I tried it in many different ways, I kinda wanted to just include the CSS in the HTML but I have other pages I want to use this style for.
0
got it.... thanx Obsessed and icreiuheciijc for all the help.