Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: how do i insert or attatch a css file?

  1. #1
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how do i insert or attatch a css file?

    hi all i am a newbie at designing websites. but have a problem i want to design a website and want to use the following menu from DD glossy menu

    but have a problem linking it to my html file. any ideas on how i can do this? and also make the file appear on other web pages the same? i am using Microsoft web expression to design the site.
    thanks

  2. #2
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    with link

    <link href= location of your css file

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    If you need a more detailed explanation:
    http://www.wellesley.edu/Computing/D...ch.html#linked

  4. #4
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i managed to link the css file but after i had done that and saved the html file as well as the css file i ran the html file and the only navigation button was the home one and also all the other 5 buttons were not the colour or attribute that was on the DD website. so when i hover over the other links that change to the correct type and off again. any on else having the same or similar issue.

  5. #5
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    Have you included the javascript file too?

  6. #6
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i only see a section which includes the HTML code and the CSS code. what and where is the java script

  7. #7
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    <script src="http://www.dynamicdrive.com/eeincludes/randomorder.js" type="text/javascript"></script>

    But you need to check because I see two others too. Sorry three

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Please post a link to your problem page so that we can see exactly what's going on.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Apr 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here is what is happening on my site

  10. #10
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Your current source code:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <ul class="glossymenu">
    	<li class="current"><a href="http://www.dynamicdrive.com/"><b>Home</b></a></li>
    	<li><a href="http://www.dynamicdrive.com/style/"><b>CSS</b></a></li>
    	<li><a href="http://www.dynamicdrive.com/forums/"><b>Forums</b></a></li>	
    	<li><a href="http://tools.dynamicdrive.com"><b>Webmaster Tools</b></a></li>	
    	<li><a href="http://www.javascriptkit.com/"><b>JavaScript</b></a></li>	
    	<li><a href="http://www.cssdrive.com"><b>Gallery</b></a></li>	
    
    </ul>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    
    <body><!-- member1 server //-->
    
    <link rel="stylesheet" type="text/css" href="glossymenu.css" />
    
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-268699-2";
    urchinTracker();
    </script>
    </body>
    </html>
    should actually be like so:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <link rel="stylesheet" type="text/css" href="glossymenu.css" />
    
    <title>Untitled Document</title>
    </head>
    
    <body><!-- member1 server //-->
    
    <ul class="glossymenu">
    	<li class="current"><a href="http://www.dynamicdrive.com/"><b>Home</b></a></li>
    	<li><a href="http://www.dynamicdrive.com/style/"><b>CSS</b></a></li>
    	<li><a href="http://www.dynamicdrive.com/forums/"><b>Forums</b></a></li>	
    	<li><a href="http://tools.dynamicdrive.com"><b>Webmaster Tools</b></a></li>	
    	<li><a href="http://www.javascriptkit.com/"><b>JavaScript</b></a></li>	
    	<li><a href="http://www.cssdrive.com"><b>Gallery</b></a></li>	
    
    </ul>
    
    
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-268699-2";
    urchinTracker();
    </script>
    </body>
    </html>
    Everything else (as far as the css and whatnot goes) should be fine.
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •