SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Hello everyone

  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    just a question

    Im new to using css, so I have a few questions. I need to set up a table cell with a few pics and links. This cell will be on all of the pages of the site. Is there a way to place write this cell into the style sheet so if I need to change a link I can just do it there instead of having to do it on every page?
    Last edited by shay; Apr 3, 2002 at 22:08.

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This would be done using Server-Side Includes (SSI), not CSS. If you still want to do it, first check if your server has SSI enabled, and then come back and let me know so I can help you out.

  3. #3
    SitePoint Zealot Arkkimaagi's Avatar
    Join Date
    Mar 2002
    Location
    Lappeenranta, Finland
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are many ways to do this. The SSI is one of them. CSS is not your answer, since CSS is ment to control the appearance of the data, not the data itself. Javascript could help. ASP, PHP, CGI and other solutions are valid too.

    Here is an javascript sample:

    Code:
    <!-- This is one of your documents -->
    <html>
    <head>
    	<title>Untitled</title>
    </head>
    
    <body>
    
    <!-- This is the link thing -->
    <script src="mystuff.js">
    
    //What if users can not use javascript?
    <noscript>Your browser does not support Javascript. Therefore you can not see my menu here.</noscript>
    
    </script>
    
    Your page here
    
    </body>
    </html>
    
    
    /* This is the mystuff.js file */
    var mylinks="";
    
    /* add here material to be used on every page */
    mylinks += " <a href=\"http://www.disney.com\">Disney</a><br> ";
    mylinks += " <a href=\"http://www.iki.fi/~arkkimaagi\">Arkkimaagi</a> ";
    
    document.write(mylinks)
    There are few ways to add material to the mylinks variable. If you use the example, remember to add \ infront of every " in the text that you include. And \ infront of every \ in the text aswell. You can also try replacing the " marks from the text with ' marks. Or the other way around.

    I hope this helps. Just ask if you have problems implementing this.

  4. #4
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies. I'm not sure if my server has SSI enabled or not, I'm really new to the server thing. I also know very little about javascript. I know HTML and can write pages (most of them usually stay on my desktop to practice with), but I thought I would try adding a style sheet to play with. I will look into the SSI and javascript and see what I come up with. Thanks again for the suggestions.


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
  •