Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Persistant

  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Persistant

    Am I to put the "persistant.css" in the place i want it to show? Like, I want my navibar to be persistant, so I only change that one css and it changes on every page, so do I put:

    <link rel="stylesheet"
    type="text/css" href="navibar.css" />

    where I want the navibar to appear?


    OR: If I am completely wrong tell me, lol!
    Last edited by cooly291; 01-22-2005 at 01:32 AM.

  • #2
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nooooo.......I get the impression you are thinking of stylesheets along the same lines as includes.

    Yes, if you have a stylesheet called navibar.css, any changes to that file will be effected accross your site, wherever you have an element with an id or class of navibar in your html.

    However the method you mentioned of linking to your stylesheet is only allowed within the < head >< /head > of your html document.

    What yo would need to do is link to your navibar stylesheet in the head of your document, then give your div, table, ul, or whatever way you are doing your nav, an id or class of "navibar".

    So you would have something like this:
    Code:
    <link rel="stylesheet"
    type="text/css" href="navibar.css" />
    
    </head>
    
    <body>
    <div id="navibar">
    <ul>
    <li>home</li>
    <li>about</li>
    <li>contact</li>
    <li>naked mud wrestling results</li>
    <li>etc</li>
    </ul>
    </div>
    hope that makes sense?

    Gary

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so if you list the elements of the navibar:

    HOME
    CONTACT
    ETC.

    Then the CSS. would be the way it is set up? You wouldn't just put the navibar in the CSS style sheet? What I am asking for is, how do I set up the CSS style sheet if you list the elements on the pages?

  • #4
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it works like this, as far as I know - Say I visit your webpage: my browser downloads your stylesheet 'navibar.css' and caches it - now as it's downloading your html page, any element in your html doc, with a class or id of 'navibar' will have the css rules applied to it, that you previously assigned in your 'navibar.css' stylesheet.

    Basically, you have two documents - html & stylesheet. Your html doc describes what the parts of your page are i.e. headers, paragraphs, lists etc; while your stylesheet dictates how these elements should look

    That's all there is to it really...........well not quite, but.............

    There are some great css menus here: http://css.maxdesign.com.au/listamatic/ if you want to study the relationship between html & css

    Gary
    Last edited by Graft-Creative; 01-22-2005 at 02:04 AM.


  •  

    Posting Permissions

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