Skip to:
Content
Pages
Categories
Search
Top
Bottom

Force positioning img in .storycontent


  • peterverkooijen
    Participant

    @peterverkooijen

    My <strike>idiot</strike> valued and respected members dump pictures in posts in the weirdest places. Is there a way via CSS magic to make them appear in the upper left corner?

    I’ve tried this:

    .storycontent {
    position:relative;
    z-index: 1;
    }
    .storycontent img {
    position:absolute;
    float: left;
    top: 0;
    margin: 0 4% 2% 0;
    z-index: 1;
    }

    It works, but it’s absolute positioning, so the picture covers part of the text.

    Anything else I could try? Or is there a setting for this in WP somewhere?

Viewing 2 replies - 1 through 2 (of 2 total)
  • With the text and images living at the same level… there’s not much you can do other than force an alignment. You can’t move an image from the middle of a paragraph to the start of a paragraph. I don’t know what your site is and what kind of content it handles… but what you MIGHT consider is disabling the media buttons in the WYSIWYG editor completely (if possible) and then… if people want to upload media… have them do that via a custom field. The plugin “Custom Field Templates” is great for this. Now you have separate database entries for the content and the media. The media is now post metadata. You can then run an SQL query to grab this data separately and have total control over where it goes, how it looks, etc.

    Of course… the bigger question is… how strict do you want to be? Maybe just let them be? Also… my crazy idea above could confuse or annoy uers who a) don’t get it or b) get it but want to put an image HERE damn it!


    peterverkooijen
    Participant

    @peterverkooijen

    Thanks for the creative suggestion, David. I figured it would be a problem for the reasons you’ve mentioned, so I’ll just go for the laissez faire approach then.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Force positioning img in .storycontent’ is closed to new replies.
Skip to toolbar