• I’m attempting to use something along the lines of these speech bubbles in WordPress posts. I have the html and CSS working great separately, but when I add the CSS to styles.css and copy-paste the html into a post, it doesn’t look anything like what it’s supposed to. My CSS margins are ignored or changed, the global CSS blockquote and img properties are affecting it, the floats don’t work, etc, etc.

    It’s clear that this is a problem with the theme’s global CSS styles cascading to break my own CSS layout. What can I do to fix that kind of problem?

    For example, in the CSS snippet below, I thought that defining the img tag for div.avatar would override the global WordPress properties for img, but it doesn’t:

    div.avatar img {
    border: solid #ccc 1px;
    }

    It apparently only modifies are adds to the global img properties. Why the hell is that? And isn’t there some sort of way to tell a portion of CSS to NOT cascade / inherit from other properties?

    Thanks a lot!

    -Ian

    P.S. Here’s the site where you can see the broken bubbles: http://regrettablemusic.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ianesque

    (@ianesque)

    So I discovered that my WordPress theme was wrapping every post in an open div:

    <div class="itemtext">

    By adding a </div> to the start of each post’s code, I was able to clear a lot of the formatting problems I was facing due to cascading global styles. You can see the greatly improved results at regrettablemusic.com.

    However, now I’m realizing that everytime I edit a post with <div> formatting in it, WordPress breaks the whole post layout by removing a bunch of my div tags! URGH! Under Options / Writing Options, I have “WordPress should correct invalidly nested XHTML automatically” turned off, but it’s still screwing up my code when I edit a post! Any thoughts?

    Please help! Thanks…

    -Ian

    Thread Starter ianesque

    (@ianesque)

    Little help? Anyone? …Bueller? …Bueller? 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problems adding CSS speech bubble layout in posts’ is closed to new replies.