0

Hi, I have this code:

<style>
div.floating-menu {position:fixed;background:#fff4c8;border:1px solid #ffcc00;}
div.floating-menu a, div.floating-menu h3 {display:block;margin:0 0.5em;float:left;}
</style>
<div class="floating-menu">
<h3>Floating Menu</h3>
<a href="http://www.quackit.com/css/">CSS</a>
<a href="http://www.quackit.com/html/">HTML</a>
<a href="http://www.quackit.com/javascript/">JavaScript</a>
<a href="http://www.quackit.com/coldfusion/">ColdFusion</a>
<a href="http://www.quackit.com/myspace/codes/">MySpace Codes</a>
</div>

which I got from a website, I was wondering if there is a way I can have this imported into a website? I thought if I saved it I could do the same type of thing as css where you do that?

4
Contributors
8
Replies
9
Views
8 Years
Discussion Span
Last Post by leegeorg07
0

sorry, what I meant is could I treat the code shown above like a css/js/php file and import it into other pages?

0

I bleileve you can import it in most cases. But the code given seems to be wrong.
Linking CSS can be done like
<LINK href="http://url/files/tabcontent.css" type=text/css rel=stylesheet>
Am not sure about this. U may ask to others too

0

no, the code validates fine, the css is embedded in the <style? tags, but I moved it into a css file. But thanks, I'll give it a shot

0

no, the code validates fine, the css is embedded in the <style? tags, but I moved it into a css file. But thanks, I'll give it a shot

Yes, you can add the code,what ever you like but the code is not 100% correct for cross browsers. Mainly in IE it will create issue, for that you have a use CSS hack, at first have to make the parent div positioned absolute for IE browser with conditional CSS hack.

0

Did you mean external css to embed in your document?
Here is import external css to document.

<style type="text/css">
<!--
@import url('yourcss.css');
-->
</style>
0

no, what I meant was external html, but it wouldn't have worked, so i changed it to php, so I could have a menu easily

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.