A Useful Tag: base href

Posted on 2007.11.26
Categories: XHTML; Tagged with: , , , , ,

If you’re coding in XHTML or if you’re creating a site in PHP, one of the pains is making sure that your relative paths are correct. Surely having to type in the full site URL is a pain, even though that would usually eliminate the relative paths problem; but instead of using
<link href="../../style/style.css" rel="stylesheet" media="screen" />
and trying to make sure that the above code works for every page of your design, you could simply utilize the easy and simple,
<base href="http://www.example.com/" />
tag!

(more…)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...