Is CSS used for this?

Discussion in 'HTML & Website Design' started by ceurillion, Feb 7, 2008.

  1. #1
    Hi everyone I am new here but was searching the web for some help. I am currently building a web site at www.commentyuwie.com this issue I am running into is the left hand link menu. This will be changing from time to time. Currently the page is built in html only which means if i add a link to the menu i have to go into every html page could be 100 pages soon and add the link in. There has to be a better way. My thinking is CSS however I have no idea how they work or how to set one up. Would anyone be able to assist me in this or perhaps you have a better suggestion then using CSS?
    Thanks!
    Sean
     
    ceurillion, Feb 7, 2008 IP
  2. Cyrus_vtn

    Cyrus_vtn Peon

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    seeing as this is 2 columns just use this

    <?php include ("left_column.php")
    ?>

    Open notepad copy and paste this (Also, delete this code from the html files **)

    <p><img src="images/comment.jpg" width="150" height="30"><br>
              <font color="#990000" size="3" face="Trebuchet MS">&gt; <a href="http://www.commentyuwie.com/pages/welcome.html">Welcome</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/thanksadd.html">Thanks 
              For Add</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/moneytags.html">Money 
              Tags</a></font></p>
    
            <p><font color="#990000" size="3" face="Trebuchet MS"><img src="images/days.jpg" width="150" height="30"><br>
              &gt; <a href="http://www.commentyuwie.com/pages/monday.html">Monday</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/tuesday.html">Tuesday</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/wendsday.html">Wendsday</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/thursday.html">Thursday</a><br>
    
              &gt; <a href="http://www.commentyuwie.com/pages/friday.html">Friday</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/saturday.html">Saturday</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/sunday.html">Sunday</a></font></p>
            <p><font color="#990000" size="3" face="Trebuchet MS"><img src="images/holidays.jpg" width="150" height="30"><br>
              &gt; <a href="http://www.commentyuwie.com/pages/fathersday.html">Father's 
              Day</a><br>
    
              &gt;<a href="http://www.commentyuwie.com/pages/mothersday.html"> Mother's 
              Day</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/easter.html">Easter</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/aprilfools.html">April 
              Fools</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/stpat.html">St. Patrick's 
              Day</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/vday.html">Valentine's 
              Day</a><br>
    
              &gt; <a href="http://www.commentyuwie.com/pages/july4th.html">July 4th</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/halloween.html">Halloween</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/thanksgiving.html">Thanksgiving</a><br>
              &gt; </font><font color="#990000" size="3" face="Trebuchet MS"><a href="http://www.commentyuwie.com/pages/christmas.html">Christmas</a><br>
              &gt; <a href="http://www.commentyuwie.com/pages/newyears.html">New Years</a></font></p>
    
            <p><font color="#990000" size="3" face="Trebuchet MS"><img src="images/codes.jpg" width="150" height="30"><br>
              </font> </p>
    Code (markup):
    then save it as left_column.php

    then when u need to add something just change the php file, save it and overwrite it on the server and every page that includes that file should change.

    -Cy
     
    Cyrus_vtn, Feb 7, 2008 IP
  3. cpufreak3

    cpufreak3 Well-Known Member

    Messages:
    346
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #3
    cpufreak3, Feb 7, 2008 IP
  4. ceurillion

    ceurillion Banned

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you very much! :) Going to give it a shot now should save me hours of work lol
     
    ceurillion, Feb 7, 2008 IP
  5. Monarch

    Monarch Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also don't forget that you will need to rename every .html page that you want to have the menu to .php for the code to work.
     
    Monarch, Feb 7, 2008 IP
  6. cpufreak3

    cpufreak3 Well-Known Member

    Messages:
    346
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #6
    Well you don't need PHP includes, if you take a look at the link I posted. you can use SHTML.
     
    cpufreak3, Feb 7, 2008 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Exactly. Either Server Side Includes or PHP will work here. Please refer to the PHP & Server Side Includes link in my signature (it goes to a post here on the forums) for details.
     
    Dan Schulz, Feb 8, 2008 IP
  8. methodcomptech

    methodcomptech Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i prefer the php include method.
    i like to put it in a function and call it that way.

    
    function writeMenuNav() {
    echo "<a href=\"link\">name</a><br/>\n";
    }
    
    PHP:
    then you include the menu file in the top of the regular file, and then just call the unction where the left nav is needed. :D

    
    writeMenuNav();
    
    PHP:
    you dont have to do it that way, just a way i like to do things. never hurt to have a new example. ;)
     
    methodcomptech, Feb 8, 2008 IP