Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS css menu repeat on HTML ?

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #35282
    vlad00
    Member

    Hello

    I’m read manual about CSS. There are some CSS menu examples.
    But i have question about HTML. This is test html page (like main page)









    So if i want keep menu on firstpage.html, secondpage.html, thirdpage.html pages i need repeat this code there ? I must do it on all HTML pages ?

    Thanks

    #91101
    chrisburton
    Participant

    You can use php so you only have to change it once.

    #91107
    TheDoc
    Member

    Create a file like ‘navigation.php’ – then instead of the HTML on each page you can put:

    #91730
    TheDoc
    Member

    What does Ajax have to do with this?

    #91739
    Brightonmike
    Member

    Didn’t you know Doc? Ajax is amazing, it’s the solution for all your web problems!

    Solve everything with Ajax!

    #91742
    SycoLV
    Member

    Dont know about Ajax but usually I use php include, I thinks the best way to insert a menu.

    #91758
    TheDoc
    Member

    I can’t tell if that iframe comment is a joke or not. So just to make sure the OP doesn’t get confused, do not use an iframe for this.

    #91764
    TheDoc
    Member

    Browser compatibility for one. It seems so simple but there are some definite quirks for some browsers. I’ve read a few instances of IE9 going a little bonkers.

    In this case, the OP isn’t trying to create some application where an iframe would (naughtily) be required. Using a PHP include would make it be a ‘single page’, not two pages that the browser has to render independently.

    #91770
    TheDoc
    Member

    It’s funny, I don’t really have an argument outside of simply knowing that it’s wrong.

    #91776
    standuncan
    Member

    Haha I was going to add I was taught never to do it, but then I couldn’t recall what any reasons were… hmm…

    #91789
    brentwpowell
    Member

    @cnwtx, php would be better from the vantage point of site performance. An iframe requires that the page requests the external iframe (nav, template part, etc.) be loaded as an additional resource to the page, at the browser level. A php include is processed on the server and the file is served as a singular entity to the client, no additional request needed by the browser. Does that make sense?

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.