Forums

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

Home Forums CSS Chris’ screencast #11 Working Modularly with PHP

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24507
    Wkevco
    Member

    I like that tutorial because it pretty much covers exactly what I want to do with my menu items. I went ahead and changed the code to include the header file and put a class=”name” on my LI’s and all the body tags have id’s. I also changed my files to php and changed all references to the correct php files. Everything works fine. The only thing I have trouble with is the css part of this. I want to have the current page menu tab to change to blue. I tried with no luck, by following the screencast as closely as possible. My css file is at http://wkevin.com/wkev.css
    I did not write 95% of the css in my file because I am still learning it. (that, and html,php,mysql…..I need a break LOL)
    If someone could steer me in the right direction with this, I would appreciate it.
    My site http://wkevin.com

    #55850
    apostrophe
    Participant

    Here you go. Just add this to your CSS:

    Code:
    body#home #menu ul li a.home, body#pizza #menu ul li a.pizza, body#sheba #menu ul li a.sheba, body#music #nav ul li a.sheba,
    body#weather #menu ul li a.weather {
    background: #0000FF;
    }
    #55851
    Wkevco
    Member
    "apostrophe" wrote:
    Here you go. Just add this to your CSS:

    Thanks! I will learn a lot from that.

    #55852
    apostrophe
    Participant
    "Wkevco" wrote:
    "apostrophe" wrote:
    Here you go. Just add this to your CSS:

    Thanks! I will learn a lot from that.

    Sarcasm? :D
    It’s pretty self explanatory. If the body id is ‘home’ then the menu unordered list, list item, anchor link with a class of ‘home’ should have a blue background. If the body id is ‘pizza’ etc.

    #55882
    Wkevco
    Member
    "apostrophe" wrote:
    "Wkevco" wrote:
    "apostrophe" wrote:
    Here you go. Just add this to your CSS:

    Thanks! I will learn a lot from that.

    Sarcasm? :D
    It’s pretty self explanatory. If the body id is ‘home’ then the menu unordered list, list item, anchor link with a class of ‘home’ should have a blue background. If the body id is ‘pizza’ etc.

    No sarcasm intended. I actually did learn a lot from that.
    I also found and fixed an error you had in there. ;)
    (you had a #nav in there. I changed it to #menu)

    #55886
    apostrophe
    Participant
    Quote:
    I also found and fixed an error you had in there. ;)
    (you had a #nav in there. I changed it to #menu)

    Oops! I’d like to say I threw that in as a test but we both know I would be lying :D
    Actually I just copied and pasted from an old file and changed the ids to match yours. Must of missed one. :oops:
    Anyhow, glad it helped.

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