Forums

[resolved] Help! Can't control half my css. (10 posts)

  1. ahmil29
    Member
    Posted 3 years ago #

    I am learning to create my own site using wordpress as the engine behind it. I have started out with the default kubrick theme and have added more pages other then the blog. I striped out all the css and try to start from scratch so the end product wont' look like the default theme.

    I have managed style the header and the horizontal navigation bar and one section of the home page. But I can't seem to affect the rest of the page with new css id/class. I can't even change the footer. I have triple checked to make sure all my div tags are closed. I used Firefox's Firebug to inspect the html and css. The parts that won't style only show the parent or inherited styles in Firebug. My new id/class doesn't even show up. What am I missing or doing wrong to cause this? I am loosing hair and going gray over this.

    My site is: http://wearmywords.com/

    I am using goDaddy's free hosting for now. I did try and validate the pages. One problem is something with goDaddy's javascript and another is the loop's unique id=post_#. (id="post-<?php the_ID(); ?>") By the way, what's the point of the id=post-#? Or how do or can you actually style that id since you don't know what that post # is going to be? Is there some other way to control it in css?

    Thanks for any and all help/suggestions.

  2. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    have managed style the header and the horizontal navigation bar and one section of the home page. But I can't seem to affect the rest of the page with new css id/class. I can't even change the footer.

    Validating your html alone is not enough, If you would have checked your css, you would have noticed a "deal-breaker" type error:

    #homeabout span {
    	font-style: italic;
    	{

    Notice the direction of the curly brace at the end of the block. This pretty much kills all styles below it including your footer styling.

    I am using goDaddy's free hosting for now. I did try and validate the pages. One problem is something with goDaddy's javascript...

    The only way around this one is to upgrade to a paid account.

    and another is the loop's unique id=post_#. (id="post-<?php the_ID(); ?>")

    I don't think this is the issue at all. These individual id's would not trigger an error. The validation report states:

    Line 35, Column 83: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag.

    This is due to the fact that you have directly nested an <li> element inside another <li> element. Please post the code found in "header.php" here: http://wordpress.codebin.ca/ and I will take a look at it.

  3. ahmil29
    Member
    Posted 3 years ago #

    OMG! THANK YOU SOOOOO MUCH mfields.
    I can't believe I did that. I really need something that shows the paring of open and close brackets on the pc. Is there such a thing for pc?
    I'll go fix up the rest of the css! I'll post the code too.

    You have given me back hope that I can do it. OK stupid mistakes aside. :p

  4. ahmil29
    Member
    Posted 3 years ago #

    Ok mfields, I just post the code at the url you gave.

  5. StrangeAttractor
    Member
    Posted 3 years ago #

    I really need something that shows the paring of open and close brackets on the pc. Is there such a thing for pc?

    Google for CSS editors. Many of them color-code your text, so it's easier to see when you've left something unclosed.

    I personally can't recommend a specific one (I use Dreamweaver, which is expensive) but I know there are lots of decent editors for free or cheap out there.

  6. ahmil29
    Member
    Posted 3 years ago #

    Thanks for all the help. I am going to close this as resolved since mfields was able to find my error.

  7. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    ahmil29,
    Hi. Glad I could help you out.

    Ok mfields, I just post the code at the url you gave.

    Sorry, I should have been more clear: you need to post the url of the code here once you have posted it the codebin.

    my favorite text editor for PC is Notepad++. It will color code most languages and has code folding abilities among many other handy features. Opensource + free :)

  8. ahmil29
    Member
    Posted 3 years ago #

    Oh you meant like this?

    http://wordpress.codebin.ca/1035554

  9. Michael Fields
    Theme Wrangler
    Posted 3 years ago #

    Yep... Thats what I needed:)

    Your header has this code in it:

    <div id="headernav">
            <ul>
              <li class="page_item"><?php wp_list_pages('title_li=' ); ?></li>
            </ul>
          </div>

    Please try like this:

    <div id="headernav">
            <ul>
              <?php wp_list_pages('title_li=' ); ?>
            </ul>
          </div>

    This should fix those <li> errors.

  10. ahmil29
    Member
    Posted 3 years ago #

    Thanks again mfields. I downloaded the Notepadd++. Nice program and it should be handy to catch my careless mistakes.

    After you pointed out the nested <li>, I went back to look at the documentation again. I am so blind. So much to read and learn at work and play. My single brain cell is getting overloaded.

    I fixed the code as you suggested. Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic