Forum Replies Created

Viewing 6 replies - 541 through 546 (of 546 total)
  • Thread Starter syncbox

    (@syncbox)

    OK, I can mark this resolved as I found the answer to mark the current navigation dynamically.

    https://codex.www.ads-software.com/Dynamic_Menu_Highlighting

    rather than approach it as what you can remove, just test each rule by commenting out the entire rule and looking through your site (all pages) to see if you see changes. I mean, some of it is obviously either cosmetic (in which case, you can pick and choose your own properties and values) and some of it is layout. If the author of the style sheet it worth his/her salt, they’ve organized the style sheet and commented it to make things clear.

    But everybody has different ways of working in css. Me, I am a minimalist class user… I only resort to classes if nothing else works and prefer to use ID’d regions and contextual selectors…eg.

    #sidebar ul {} or #footer p

    and I tend to rely heavily on inheritance, cascade and specificity. I detest seeing font-family repeated over and over, but hey, that’s just me.

    Anyway, I am a beginner at WP and php, but am in the process of taking the default template and turning it into my own template, pretty much completely rewriting the style sheet, for sure. I don’t much care for gigantic header.php layouts and find a lot of templates boringly the same.

    I hope to complete mine and share it with pride when done.

    D

    If you have access to the body tag, you can pass an ID or class to set the body background-color, which you specify in the style.css page. For example:

    body#red {
    background-color:#ff0000;
    }
    body#blue {
    background-color:#336699;
    }
    This would be true for just about any element, assuming you can set an ID on the body tag…but it requires that the body tag be available for editing in each Page or Category template.

    I’m new to this but have managed to set mine up for it, and have asked the question if it’s possible to pass an id for the body tag dynamically, but have had no replies indicating HOW, if possible.

    I’m all ears, btw, if anyone knows how to set the id of the <body> dynamically (on a link?)(without breaking anything else?)

    Thread Starter syncbox

    (@syncbox)

    OK, while reading through the documentation, I think my answer is
    1) make the body tag accessible (which I’ve done)
    2) build a template for each category (I’m using 3) that will have ongoing posts
    3) build WP Pages for non-post “pages” that equate to static pages

    but, if there is a way to pass an id to the body tag that someone knows about that doesn’t involve what I’ve described, again, I am all ears!

    Donna

    Thread Starter syncbox

    (@syncbox)

    OK< I just went back and made the body tag accessible in my templates. Now, I’ll set up my group bodyid rules. The beauty of this is that I can control all the properties in any page by setting a class (or multiple classes) and an ID on the body tag to determine background images used in any container, to set the “selected” state of any navigational link, etc.

    When I am done, I’ll post a link to my site (content isn’t finished by any means, but to show the way css can be controlled via the body tag)

    Thread Starter syncbox

    (@syncbox)

    for css. typically, if you are building pages using ssi, you can modify the body tag– by setting the id, you can tap into css rules that only apply if/when a certain combination of body container settings are met, as in

    body#who div#mainnavs a.who,
    body#home div#mainnavs a.home,
    blah,
    blah

    so that ONLY when the body has a particular id does that rule’s property kick in.

    But I decided to move on anyway, and opted to modify the header to separate the navs out of that file so that I can make separate files for a group of templates.

    probably not the most efficient way to do it, but I have to try to finish this by the end of the weekend.

    However, if you have ideas, I’m all ears as I would love to learn a method for the future. I’m like wordpress and hope to take it to my clients wherever possible. I have a big project coming up that I think would be perfect for wordpress.

Viewing 6 replies - 541 through 546 (of 546 total)