What is meant to be actually mydomain.com/css/ or just /
Is this relative/absolute path...need more information.
all you need to remember when first in the path, THIS -> / means "start at the web site's root." You can see this in action. Put this in any page and name it "test.html":
<a href="/">DOMAIN ROOT</a>
What happens? Home page, right? Now put it in a folder/directory inside ANOTHER folder/directory. Don't change it at all.
/images/products/testpage.html (FOR EXAMPLE)
Find it through your browser and click the link again. What happens? Home page again, right? :-) But you didn't change anything. You didn't have to do this
<a href="../../">DOMAIN ROOT</a>
because this
<a href="/">DOMAIN ROOT</a>
means "start at the domain root."
Now extend that to other examples.
<a href="/about">about us</a>
<img src="/images/somefile.jpg" alt="">
#some-selector { background: url(/images/somefile.jpg); }
Move the pages those contain around in your directory structure.
Wherever they are, they will work. The following may confuse you, so you can ignore it. :-) Relative means "relative to where I am now." So if you are in, say, the "about-us" directory, and you do this
href="somefile.html"
it will only work if somefile is in the same "about-us" directory that you're in. It's relative to "wherever you are." But this
href="/somefile.html"
Is also relative, but it's
relative to the domain root, not relative to where you are. These are often described as "absolute URL's" but that has never made sense to me; an absolute URL is the fully qualified URL to a resource:
http://www.example.com/somefile.html
It is
absolute, it can't be used for anything but what it is, but a root-relative link CAN be moved anywhere. You can even put that same file on another site, and it's still going to go to the root of whatever that domain is.
So the leading slash that is a
root-relative URL and the absolute URL become the same result. It just allows you to use it EVERYWHERE. If you use the absolute URL, what happens when you go to a secure portion of your site? EXACTLY . . .http: is no longer valid. But this STILL IS! :-)
href="/somefile.html"