When you use a background image and set the src are you making that the src from the css file the path or the source from the file that the background image will actually be active in ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
srcattribute in HTML is relative to the rendered document. If you had a file/index.htmland the img you wanted to inlude was at/img/1.png, the attribute would readsrc="img/1.png".Likewise, the
urlattribute in CSS is relative to the CSS document. If your CSS file was at/css/styles.cssthe attribute would readbackground:url('../img/1.png').