html - How do I "<img src='url'..." without having the domain in the url? -


it's silly question can't find right way it.

i making wordpress theme myself , in css, specifying image sources full domain.

example:

#header {  background: #ffffff url("http://mydomain.com/wp-content/themes/mytheme/images/header-bg.jpg");  } 

i want make sure works if install theme in domain. proper way specify source in case?

you have use relative paths css file, example if have following structure:

/mytheme/images/header-bg.jpg /mytheme/style.css 

then @ style.css make rule this:

#header {     background: #ffffff url("images/header-bg.jpg"); } 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -