WordPress.org

Forums

[resolved] divs won't float and respond inside twenty twelve page (11 posts)

  1. vflorschuetz
    Member
    Posted 2 years ago #

    Hi,

    I have tried several techniques to make my inline divs float and respond to screen width and can't figure it out.

    I did search the forums and found a few solutions that still didn't work. Not sure what I am doing wrong.

    I want to add responsive inline div tag content right on the home page template and the single column template pages using the dashboard page module. I am using a child theme that appears to be reading okay, but the content elements inside the web pages themselves are not responding at all.

    You can see the issue on the first page: http://dentaldesignofarcadia.com/wpdev/

    Here is my child theme and I place the custom code at the top so it's easy to find. There are two different types of floats I was trying out: cta, dr, and box. I thought the box styles would work for sure. I tried adding the delcaration "float: left;" inside the "box2" class selector and the elements do float left, but then they don't respond and stack. Very puzzled.

    http://dentaldesignofarcadia.com/wpdev/wp-content/themes/twentytwelve-child/style.css?ver=3.5

    Any help would be much appreciated.

    Thanks,
    Vickie

  2. Andrew
    Forum moderator
    Posted 2 years ago #

    Why do you have so many styles in your Child Theme style.css file? It looks as though they've been copied over whereas they should be imported over. See http://codex.wordpress.org/Child_Themes#Example_of_a_basic_Child_Theme

  3. vflorschuetz
    Member
    Posted 2 years ago #

    I copied the styles from the original. I thought that was what I was supposed to do. Could this be creating a conflict?

    I put my custom styles at the top so it would be easier to find. Are you able to assist with my question?

  4. Andrew
    Forum moderator
    Posted 2 years ago #

    Can you replace the code you've copied with an import line? That's how Child Themes are supposed to work.

  5. vflorschuetz
    Member
    Posted 2 years ago #

    Actually I did use the import line in the child styles on line 57 just above my Custom CSS comment. I'll remove all the extra duplicate code. Perhaps that is my issue.

  6. Andrew
    Forum moderator
    Posted 2 years ago #

    Okay, let us know when you've removed them.

  7. vflorschuetz
    Member
    Posted 2 years ago #

    I have made the changes to the styles.

    Thanks for the clarification. The issue is still there so it's something that I am doing incorrectly.

  8. WPyogi
    Forum Moderator
    Posted 2 years ago #

  9. Andrew
    Forum moderator
    Posted 2 years ago #

    You've a trailing comma;

    .box1, .box2, .box3,

    Remove that (on box3). It's a syntax error.

  10. vflorschuetz
    Member
    Posted 2 years ago #

    Hi,
    Thanks for the feedback.

    First, fixing that one syntax error corrected my float problem. I still have the issue of the floats being un-responsive. Nothing inside the page content is scaling responsively. Can you please advise?

    Second, I did look at the W3C validator on my child header.php and a number of errors came up. When I looked them up in the W3 Errors Explanations Page, these types of errors are on the list of errors without explanation, i.e. #46 and #188. At any rate, the same errors showed up when I did a validation check on the original header.php page from the parent theme, so I don't really know what to do with this. I am making an educated guess that TwentyTwelve is ahead of the curve, so W3 needs to catch up. :)

    My primary concern right now is the responsive issue.

    Appreciate your help.

  11. vflorschuetz
    Member
    Posted 2 years ago #

    Just wanted to let you know that I figured out my responsive problem. I had the wrapper class width set in pixels. No wonder.

    Thanks for you assistance.

Topic Closed

This topic has been closed to new replies.

About this Topic