• Hi,
    I am new to wordpress.

    I made an image for easier understanding: https://imgur.com/UZB3B.png

    I am creating a new theme and I want to position my images in posts to position right to the text of my post (uploaded picture 1&2 in the linked image). So I don’t want the text to float around the images, and I want the same padding between the images.

    In html I would create two div-s, one for the text and one for the images, but I have a feeling that wordpress wolud put all uploaded image to the same div as the text.

    How should I proceed in coding the css to later when I “wordpressize” my static html it would work like I needed?

    Thanks in advance!

    sorry for my grammar)

Viewing 2 replies - 1 through 2 (of 2 total)
  • not sure if this is the best way to go about it but here are two options:

    1) use a style to push the images over. for example do something like
    .post img{ margin-left: 520px; }
    that will push the images right. where your content is 500px wide, giving you a 20px gap.

    2) you could just use custom fields and insert the images that way, and style them as desired in your template files.

    Thread Starter gd42

    (@gd42)

    Thanks!

    The problem with 1) is that if I set the margin-left 520, no text is showing up near the image, just below and above (it seems the margin is working like a placeholder in the height of the picture)
    If I set the pictures to float:right, then the images are stacking up from roght to left when the text is over.

    With Custom Fields it would be hard to write posts, since there will be at least 5-6 picture per post, and manually upload them to ftp (and create a folder-structure that makes sense) seems like too much hassle (especially because I won’t be the only one who posts).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to position images in a different div than the text of my posts’ is closed to new replies.