1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Navbar Links

Discussion in 'CIW Certifications' started by IThurts, Mar 7, 2008.

  1. IThurts

    IThurts Kilobyte Poster

    284
    2
    32
    Hi again people,
    Iv been busy working with my portfolio and have a nice little site coming along. Nothing too flashy but just utilising gradients in photoshop to get a nice-ish design for my site.


    Anyway, am i being really thick if iwas to ask th below:

    LINKS (ie: navbar links)....how the heck do i code it so the links are part of my style sheet as opposed to embedded in my HTML doc? Obviously i am racking up a few HTML pages now, and dont really want to have to add EACH link for EACH webpage to update the links in the navbar, if i say add another page to my site.

    I am getting to the stage where i wanted to create some buttons in photoshop and use them as my navbar links instead of chunky coded buttons. :) So i have created the button template, and am ready to link a page to it in the navbar but then realised the above question!!:eek:

    Hope that all made sense and look forward to any responses.



    ta.
     
    Certifications: BTEC national Diploma Computer Studies
    WIP: See Sig
  2. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    I think this article I found at techrepublic is the closest you'll come to finding what you're looking for.
     
    Certifications: A+ and Network+
  3. SimonV

    SimonV Petabyte Poster Administrator

    6,616
    151
    228
    I've never seen it done before, if your host supports PHP you could very easily do it using some very simple php and make elements like the header footer and navbar alot easier to manage.

    Let me know if you need some help with the code.
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  4. IThurts

    IThurts Kilobyte Poster

    284
    2
    32
    :eek: So you mean to tell me that there is no way to update navbar links using CSS stylesheets?? Which means i am going to have to write in links in every page of my html docs so each page displays the new link in the navbar?:cry:

    Guess i best start learning PHP....:rolleyes:

    My ultimate next question would be then...if my website is local only to my machine at the mo, i cannot update links in my navbar other than the before mentioned method stated above?
     
    Last edited by a moderator: Jan 2, 2015
    Certifications: BTEC national Diploma Computer Studies
    WIP: See Sig
  5. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    If i have picked you up correctly you could use SSI(Server Side Includes), save you menu in a file called menu.inc and the pop this in the pages where you want to display the menu

    Code:
    <!--#include FILE="menu.inc" -->
    
    this should mean you only need to edit the menu.inc to change your nav or learn something dynamic as per :rolleyes:
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  6. IThurts

    IThurts Kilobyte Poster

    284
    2
    32
    That is exactly what i was after. Thanks for that Thomas.Rep awarded. So this SSI file, im lost as to how to begin. Should i create the file as a .inc file?? What code do i include?

    Maybe i should google it :oops:
    Any hlp would be great though:p
     
    Certifications: BTEC national Diploma Computer Studies
    WIP: See Sig
  7. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    it would look something like my attachment, heres a good place to start

    also if your server doesn't support SSI, the PHP(if supported)/JavaScript example in that link are viable option as its not too complex
     

    Attached Files:

    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  8. IThurts

    IThurts Kilobyte Poster

    284
    2
    32
    Thanks again Thomas, great help, exactly what i was after. I had a thought actually....(wait for it)...and assumed when first starting out that CSS would do all of what i enquired about in its External style sheet. Surely this is what the purpose of CSS are? I guess CSS gears more towards design simplification/convienience rather than things like my initial question. It would be handy to be able to include the "include files" in your CSS, although im aware it doesnt work like that, would be handy to be able to include these files within the Stylesheet itself. Maybe im after too much of an easy life :biggrin

    Cheers guys.
     
    Certifications: BTEC national Diploma Computer Studies
    WIP: See Sig
  9. Stoney

    Stoney Megabyte Poster

    731
    23
    69
    CSS is supposed to be used for controlling the format and layout of the web page, not the actual content, hence why you can't specify the hyperlinks in the CSS file. You can create all sorts of classes to format them however you like, but you can't change the content.

    HTH 8)
     
    Certifications: 25 + 50 metre front crawl
    WIP: MCSA - Exam 70-270
  10. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152
    Welcome to Dynamic Drive's new CSS library! Here you'll find original, practical CSS codes and examples such as CSS menus to give your site a visual boast.

    http://www.dynamicdrive.com/style/
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  11. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    Gosh, Mitzs...you sound like a spammer. :tongue
     
    Certifications: A+ and Network+
  12. wizard

    wizard Petabyte Poster

    5,763
    35
    174
    Don't say that, I can hear her rummaging in her desk draw for the roll of duct tape :twisted:
     
    Certifications: SIA DS Licence
    WIP: A+ 2009
  13. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152

    Duck tape hell, I'm gonna get my flame thrower out for that one.

    [​IMG]
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  14. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    You have to catch me first. :D
    [​IMG]
     
    Certifications: A+ and Network+
  15. Mitzs
    Honorary Member

    Mitzs Ducktape Goddess

    3,282
    73
    152

    Your not as fast as you use to be old man.:twisted:8)

    [​IMG]
     
    Certifications: Microcomputers and network specialist.
    WIP: Adobe DW, PS
  16. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    179
    287
    Can't win them all (ouch).
    [​IMG]
     
    Certifications: A+ and Network+

Share This Page

Loading...