944,147 Members | Top Members by Rank

Ad:
Oct 10th, 2009
0

embedding html?

Expand Post »
Hi, I have this code:
HTML and CSS Syntax (Toggle Plain Text)
  1. <style>
  2. div.floating-menu {position:fixed;background:#fff4c8;border:1px solid #ffcc00;}
  3. div.floating-menu a, div.floating-menu h3 {display:block;margin:0 0.5em;float:left;}
  4. </style>
  5. <div class="floating-menu">
  6. <h3>Floating Menu</h3>
  7. <a href="http://www.quackit.com/css/">CSS</a>
  8. <a href="http://www.quackit.com/html/">HTML</a>
  9. <a href="http://www.quackit.com/javascript/">JavaScript</a>
  10. <a href="http://www.quackit.com/coldfusion/">ColdFusion</a>
  11. <a href="http://www.quackit.com/myspace/codes/">MySpace Codes</a>
  12. </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?
Similar Threads
Reputation Points: 35
Solved Threads: 32
Posting Pro in Training
leegeorg07 is offline Offline
428 posts
since Jul 2008
Oct 10th, 2009
0
Re: embedding html?
I didnt understand your question.. Please tel me it more clearly
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mja0mja is offline Offline
6 posts
since Dec 2008
Oct 10th, 2009
0
Re: embedding html?
sorry, what I meant is could I treat the code shown above like a css/js/php file and import it into other pages?
Reputation Points: 35
Solved Threads: 32
Posting Pro in Training
leegeorg07 is offline Offline
428 posts
since Jul 2008
Oct 10th, 2009
0
Re: embedding html?
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mja0mja is offline Offline
6 posts
since Dec 2008
Oct 10th, 2009
0
Re: embedding html?
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
Reputation Points: 35
Solved Threads: 32
Posting Pro in Training
leegeorg07 is offline Offline
428 posts
since Jul 2008
Oct 13th, 2009
0
Re: embedding html?
Click to Expand / Collapse  Quote originally posted by leegeorg07 ...
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.
Reputation Points: 11
Solved Threads: 1
Light Poster
dipak_passion is offline Offline
34 posts
since Dec 2008
Oct 13th, 2009
0
Re: embedding html?
oh, it all seems to work fine, but thanks anyway
Reputation Points: 35
Solved Threads: 32
Posting Pro in Training
leegeorg07 is offline Offline
428 posts
since Jul 2008
Oct 13th, 2009
0
Re: embedding html?
Did you mean external css to embed in your document?
Here is import external css to document.
HTML and CSS Syntax (Toggle Plain Text)
  1. <style type="text/css">
  2. <!--
  3. @import url('yourcss.css');
  4. -->
  5. </style>
Reputation Points: 120
Solved Threads: 134
Practically a Master Poster
Zero13 is offline Offline
620 posts
since Jan 2009
Oct 13th, 2009
0
Re: embedding html?
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
Reputation Points: 35
Solved Threads: 32
Posting Pro in Training
leegeorg07 is offline Offline
428 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: <td nowrap="nowrap" /> is not working in IE8
Next Thread in HTML and CSS Forum Timeline: Extending the box model?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC