Grow your CSS skills. Land your dream job.

Site navigation question (page switching)

  • # October 13, 2009 at 4:12 am

    Hello everybody,

    I am currently building my very first website. I got the hang of html and CSS, everything is going pretty good right now, but I have a slight problem with how exactly you switch from one page to another, just like in this website for instance :

    http://borderleft.com/

    When you click on "Work" for instance, the address changes to http://borderleft.com/work and the content obviously changes. Now, how do I do that ? Do I hide and replace the content through CSS or do I create a new html file for each page and link to them in the navigation menu ?

    I’d rather have something sleek and light kilobytes-wise, and this website Borderleft up there doesn’t seem to have extra html pages since it doesn’t show up in the address bar.

    Sorry if this sounds dumb, like I said I am barely starting out. I tried google searches for that but didn’t come up with anything attending my problem. Thanks again for any help.

    Edit : i’m looking to achieve a static website, no dynamic content for the time being (there’s probably going to be a WordPress implementation down the road though)

    # October 13, 2009 at 12:59 pm

    For each page on the site you’ll need a separate HTML file.

    In the site you referenced, there actually IS an html file there. All files that are "index.html" don’t have to show up in the address bar because they are considered "default". So, this person has created a new folder called "work" and put the html file "index.html" inside of it. The "index.html" won’t show, only the "…com/work/" will show.

    To hammer the point home, I work on a few sites that have thousands (yes, thousands) of pages.

    # October 14, 2009 at 3:18 am

    Thank you for your answer, it makes sense to me now. So I assume there needs to be one style sheet per page then? That’s going to be a lot of code ;)

    Hopefully I can start helping out in a couple of months too :mrgreen:

    # October 14, 2009 at 4:04 am

    No no no. The point of CSS is to have ONE stylesheet for an entire site.

    I don’t think you particularly understand how everything works yet. Do some more reading. These are somewhat basic concepts that need to be understood before you even begin learning any code.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".