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

Thread: Is this possible?

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

    Question Is this possible?

    I'm new to CSS but I'm learning

    What I want to do is use CSS for a menu. But I want to edit the menu in one place and not on each page.

    Currently I have used Example 4 on this page http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
    and I love it, but as I build the site and add more I don't want to edit each and every page.

    Thanks for any suggestions.
    Dawn

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Nope. Css can't do that.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It could be possible using an external .js file and writing it with javascript, but the best method is a server side include option, like using the include() function in PHP, or SSI, depending on what will be available on your server.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Well... if you use a completely CSS menu then all you have to edit is the CSS file... You can use images instead of text for the links, etc and you can call those images in the CSS file, wanna change the menu? make new pictures, and change it in the CSS.

    A similar effect CSS only menu can be found here
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    What about the links?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    If you want to have the same tab menu on each page, you can use this.
    Put the tab menu in 'menu.html'.

    Arie Molendijk.

  7. #7
    Join Date
    Jan 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    my man! i need something like that too and with your help i got it thanks.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's still not css, and certainly not bulletproof - it requires javascript. The only really good way to do something like that at the moment is server side. xml/xsl works in all modern browsers though, and I am therefore excited about it, as it's both a fairly simple method and easily tested locally without any special setup compared to server side coding which is fairly complex and requires some sort of local server to test it locally.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jan 2008
    Location
    Portland, Oregon
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by justdawn View Post
    I'm new to CSS but I'm learning

    What I want to do is use CSS for a menu. But I want to edit the menu in one place and not on each page.

    Currently I have used Example 4 on this page http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
    and I love it, but as I build the site and add more I don't want to edit each and every page.

    Thanks for any suggestions.
    Dawn
    I am guessing that you would like a modularized menu bar that you can simply create once and have it appear on every page that loads it??? You can easily implement an OOP style menu simply by creating the menu and save it as menu.php -
    Now, you can load that menu into index.php by using readfile() or include() functions.

    IE of index.php

    <?php

    <div>

    /*
    Read file menu.php from disk and output it to the screen
    note: this method can be used to read-in text files and
    other web-pages as well without having to bother with
    forms
    */
    readfile('./menu.php'); //or include('./menu.php');

    </div>

    php?>

  10. #10
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    But Justdawn just wanted css for the menu!
    The question how you can put the menu on every page is another matter.

    Arie.

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
  •