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
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    can CSS hold logo and menu?

    I want to have every page on my site with the same logo at the top of the page, and then a horizontal menu running below it. Is it possible to put all that into an external CSS file so that if the menu items change, I only have to change the CSS file and all the pages update? If so, how?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Presentation

    CSS is meant to control the presentation of a page. If it's the presentation of the logo and menu you're concerned with, yes, you can style those using one external style sheet for all your pages.

    If you however want to store the content of that menu in one file and attach it on-the-fly to each and every page, CSS is not suitable for this purpose.

    It could be done with JavaScript, but a far superior solution would be a server side approach; server side includes, when available, are one such approach, and if a server side scripting language such as ASP or PHP can be used, dynamically including external code fragments are a cinch.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Or failing that, an iframe maybe. But I'd definitely not take that approach over a server side one.
    Omnis mico antequam dominus Spookster!

  • #4
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the quick reply, im gonna go with the php include, thanks again


  •  

    Posting Permissions

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