Putting divs in external css files

  • zudo
  • Beginner
  • Beginner
  • zudo
  • Posts: 35

Post 3+ Months Ago

Putting a div in a .css file, I have some text that I want repeated on every page, but you can't put text in an external .css file, will I have to do it manually?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

You should try server-side includes via shtml or a scripting language. CSS isn't the solution in this case. Post more questions and we'll be able to help you more.
  • zudo
  • Beginner
  • Beginner
  • zudo
  • Posts: 35

Post 3+ Months Ago

how about this

Code: [ Select ]

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
<link rel="copy" type="text/html" href="copy.html"/>
<style type="text/css">
#logo {position: absolute; left: 25%; top: 25%; width: 278px; height: 275px;}
#copy {position: absolute; left: 50%; top: 100%;}
body {background: url(background.gif) background-repeat:none;}
</style>

</head>

<body bgproperties="fixed">
<div id="logo">
<img src="logo.gif">
</div>



</body>
</html>
  1. <html>
  2. <head>
  3. <link rel="stylesheet" type="text/css" href="style.css"/>
  4. <link rel="copy" type="text/html" href="copy.html"/>
  5. <style type="text/css">
  6. #logo {position: absolute; left: 25%; top: 25%; width: 278px; height: 275px;}
  7. #copy {position: absolute; left: 50%; top: 100%;}
  8. body {background: url(background.gif) background-repeat:none;}
  9. </style>
  10. </head>
  11. <body bgproperties="fixed">
  12. <div id="logo">
  13. <img src="logo.gif">
  14. </div>
  15. </body>
  16. </html>

<link rel="copy" type="text/html" href="copy.html"/> doesn't seem to work though :x
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

The only thing that comes remotely close to it in css is the content property, but it's not supported at all by IE yet as far as I know, and you can't include html tags in the content anyway. As gsv2com said a server-side include of some sort would seem to be the ideal solution. Theoretically, you can append content from an external javascript file, but that would be far from ideal because it would require a modern browser and wouldn't work at all if javascript were disabled .

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 49 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.