embedding html?

Reply

Join Date: Jul 2008
Posts: 396
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz

embedding html?

 
0
  #1
Oct 10th, 2009
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?
don't judge me because I'm a year 8!

'it is better to fight for something than to live for nothing'General George S Patton
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: mja0mja is an unknown quantity at this point 
Solved Threads: 0
mja0mja mja0mja is offline Offline
Newbie Poster
 
0
  #2
Oct 10th, 2009
I didnt understand your question.. Please tel me it more clearly
----------
Keno
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 396
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz
 
0
  #3
Oct 10th, 2009
sorry, what I meant is could I treat the code shown above like a css/js/php file and import it into other pages?
don't judge me because I'm a year 8!

'it is better to fight for something than to live for nothing'General George S Patton
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: mja0mja is an unknown quantity at this point 
Solved Threads: 0
mja0mja mja0mja is offline Offline
Newbie Poster
 
0
  #4
Oct 10th, 2009
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
----------
Keno
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 396
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz
 
0
  #5
Oct 10th, 2009
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
don't judge me because I'm a year 8!

'it is better to fight for something than to live for nothing'General George S Patton
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 30
Reputation: dipak_passion is an unknown quantity at this point 
Solved Threads: 1
dipak_passion's Avatar
dipak_passion dipak_passion is offline Offline
Light Poster
 
0
  #6
Oct 13th, 2009
Originally Posted by leegeorg07 View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 396
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz
 
0
  #7
Oct 13th, 2009
oh, it all seems to work fine, but thanks anyway
don't judge me because I'm a year 8!

'it is better to fight for something than to live for nothing'General George S Patton
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 91
Reputation: Zero13 is an unknown quantity at this point 
Solved Threads: 13
Zero13 Zero13 is offline Offline
Junior Poster in Training
 
0
  #8
Oct 13th, 2009
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>
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 396
Reputation: leegeorg07 is an unknown quantity at this point 
Solved Threads: 31
leegeorg07's Avatar
leegeorg07 leegeorg07 is offline Offline
Posting Whiz
 
0
  #9
Oct 13th, 2009
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
don't judge me because I'm a year 8!

'it is better to fight for something than to live for nothing'General George S Patton
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC