im creating extern css-file homepage. problem know how fix 1 html-page, not rest.
on page "contact" have in head.
< link rel="stylesheet" type="text/css" href="test.css" />
but want connect other pages css-file. how do it?
exactly same way. between <head></head>
tags of each page, put:
<link rel="stylesheet" type="text/css" href="test.css" />
i use css comments divide css file sections, this:
/* general */ .header{ width:50px;etc.} .nav {width:50px;etc} /* home page */ #mainpic {width:50px;etc} #somethingelse {width:50px;etc} /* page 2 */ .img {width:50px;etc} #menu {width:50px;etc}
remember if have elements on 2 pages (two different areas of same css file) have same name, second 1 overwrite first:
/* home page */ #mainpic {width:50px;} #somethingelse {width:50px;etc} /* page 2 */ .img {width:50px;etc} #mainpic {width:333px;}
in above example, #mainpic element on both pages have width of 333px. therefore, use same id or class names elements have same css. if css changes, change 1 of names:
#mainpic2 {width:333px;}