There are two related 开发者_JAVA技巧sites. Each has its own CSS. Some of the content (contact info, etc) needs to be appear on a page in each site, but with the appropriate styles applied.
Is there a way to do this without duplicating the content?
Define the same css classes in your two CSS files, and at the top of each page, bring in the proper file.
For the first page: <link rel="Stylesheet" type="text/css" href="style/site1.css" />
Then the other page: <link rel="Stylesheet" type="text/css" href="style/site2.css" />
This is content management issue, and the correct solution for you will depend on what sort of content management you're using for these sites. If you're not using any CMS, you could still use something like PHP or JavaScript to dynamically pull content from one of the sites and display it on the second.
For example, using jQuery you could do something like this on the second site:
$('#container-element').load('http://first-site/shared-content.html');
精彩评论