WordPress.org

Ready to get started?Download WordPress

Forums

DIV tag problem (13 posts)

  1. kunjan1029
    Member
    Posted 9 years ago #

    Ok I am about to pull my hair out.... I have misplaced a div tag somewhere can't find where!!!

    on my site if you go down and see the footer the white background has to look like
    link 2

    so if i put in an extra </div> tag then the home page looks ok but the post page it breaks

    http://kunjan.net/wp-content/themes/thoughtmechanics/header.phps
    http://kunjan.net/wp-content/themes/thoughtmechanics/index.phps
    http://kunjan.net/wp-content/themes/thoughtmechanics/footer.phps

    any ideas?

  2. Lorelle
    Member
    Posted 9 years ago #

    Okay, okay, save your hair. You might not have any left soon.

    I'll look at your site but in the meantime, I want you to go through the various CSS sections (page, header, content, sidebar, footer, etc.) and add the following attribute (don't forget the semi-colons!):

    ...; border: solid 1px colorname; }

    In the place of colorname make each section a different color. Like page is yellow, header is green, content is red, sidebar is purple...and so on. When you view the page, you should see the colored boxes around the different section. If one of those boxes stretches down into another, there is your lost div. If it cuts off too earlier, there is a div placed in a wrong section.

    Give it a try while I looksee.

  3. Kafkaesqui

    Posted 9 years ago #

    Just on a quick glance, I have to wonder where the insideWrapper div in your header is supposed to end.

  4. Lorelle
    Member
    Posted 9 years ago #

    I'm trying to trace that right now....It should be at the end either in the footer or index below the footer include...maybe. I'm still poking around.

  5. kunjan1029
    Member
    Posted 9 years ago #

    inside wrapper should end after the insideWrapper and before the creative commons image.

    Thanks a lot!! for your help....

  6. Lorelle
    Member
    Posted 9 years ago #

    Found it. It's in the footer. Okay, I've done a casual check of Link2 and it looks like all the divs are there. I would run your HMTL generated pages through a couple of validators and I bet it would find it there, if it is indeed missing from one of the pages, or you have too many.

    Having the ending DIV for the insideWrapper in the footer is bad. I'd move it to the end of the index.php page before the "include footer" tag. Just to stay clean. I hate little things like this.

  7. Lorelle
    Member
    Posted 9 years ago #

    Oh, so that is it?

  8. kunjan1029
    Member
    Posted 9 years ago #

    ok i moved that < / div> to index.php but it didnt fix it :( everything should look like link2

    thanks thanks i put in the css thing for borders

  9. kunjan1029
    Member
    Posted 9 years ago #

    ok see i put in the closing div tag in where the insideWrapper should end. but then if u look at a post page (link2) its broken see my delimma?

    aargh u are right i might not have enough hair... hehe

  10. Lorelle
    Member
    Posted 9 years ago #

    Okay, run it through some validators...did you? That should help figure it out. Run the broken stuff.

    Oh, I got it. On your unbroke page:

    <div class="cent">

    Doesn't seem to have a closing tag. Check that for me to make sure. It validated but I couldn't find a closing tag for that.

    For the broke page:

    Line 205, column 5: end tag for element "div" which is not open </div>

    Is what I got from the validator. If you don't have an open tag, don't but throwing one in there because you think you need it.

    Does this help?

  11. kunjan1029
    Member
    Posted 9 years ago #

    you know wht that is it

    <div class="cent"><!--more--></div>

    that post looks like that but that </div> after the post is missing on the generated page!!!

    arrgh figured it out!
    why would wordpress do that?

  12. kunjan1029
    Member
    Posted 9 years ago #

    i changed <div class="cent"><!--more--></div>
    <p class="cent"><!--more-->

    that fixed it thanks a lot guys btw which validators did u run it through???

    thanks a lot!!!

  13. kunjan1029
    Member
    Posted 9 years ago #

    yup that was it that </div> after the <!--more--> was eaten up!

    Thanks a lot people!!!!!!!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.