10 replies
I have a question about the layout in WordPress.

When i add an image in a post then put a link next to the image, the link is always low down. How do i make it so i can have an image then put a link about half way up at the side of the image as ive shown in the screenshot below.

Also as ive indicated by the red box, how do i put an image on the other side of the post, without that being low down either but a bit higher up?

Thanks for your help.


#layout #wordpress
  • Profile picture of the author Sheryl Polomka
    I think you would maybe need to create a table using html if you wanted it centered next to the image.
    Signature
    {{ DiscussionBoard.errors[2974154].message }}
    • Profile picture of the author cooler1
      Originally Posted by oneplusone View Post

      One thing you can do is create it in something like Word, then take a screenshot and insert the image instead.

      Then it will be even more powerful, because if people click the image (which many do) they will open up the link.

      Another thing you can do is simply add more text below the link, like a couple of benefits to push the link up.

      I'm not expert at this technical stuff, but usually it is matter of playing around with things to get the desired results.
      Problem with that is, it only lets you put a link low down. Even if you put text below where you want the link to be, it doesn't let you enter a link above it.

      Originally Posted by Sheryl Polomka View Post

      I think you would maybe need to create a table using html if you wanted it centered next to the image.
      How do i go about doing that?
      Signature
      {{ DiscussionBoard.errors[2974199].message }}
  • Profile picture of the author Istvan Horvath
    Short version: CSS.

    Longer version: It is not a "WordPress layout" issue - it is about positioning an image in your post. (just that you know next time what are you talking about)

    If your inserted images do NOT have any additional class defined in the style.css file of your theme, they will behave exactly as you experienced:
    - going "below" the element before them and
    - forcing any element that comes after to go below them
    It is not WP specific... that's how HTML works.

    In order to "push" the text up next to image you will need to "float" your images.
    Homework:
    CSS Float
    CSS float property

    For the red gizmo... I'd, probably, use a float:right + margins - but that's me only because I know CSS and I know how the WP stylesheet works.
    Signature

    {{ DiscussionBoard.errors[2974225].message }}
  • Profile picture of the author julesw
    probably someone will tell me this will get you into trouble with google for hiding stuff but how about using dots and making them white to make the space between the image and the link or is that a no no?
    Signature
    WIN my Lanparte Smartphone or GoPro Gimbal! Get Ready Get Steady! Watch my Video Here:
    VideoHero.com/win
    {{ DiscussionBoard.errors[2974228].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by julesw View Post

      probably someone will tell me this will get you into trouble with google for hiding stuff but how about using dots and making them white to make the space between the image and the link or is that a no no?
      I don't know what G. would tell you... I just know what the common sense would say: if you want fancy positioning in WP, learn CSS!
      Signature

      {{ DiscussionBoard.errors[2974243].message }}
  • Profile picture of the author cooler1
    @Istvan Horvath. When ive created the CSS code, which CSS file should i put it in exactly if i want the image/link to be the displayed on the main home page.

    Im using the Twenty Ten theme.
    Signature
    {{ DiscussionBoard.errors[2974315].message }}
  • Profile picture of the author Istvan Horvath
    There should be a style.css in your theme... some have even more than one. How do I know what theme you are using?

    The CSS part should look like:
    Code:
     
    .alignleft {
    float: left;
    margin: 2px 12px 3px 0;
    }
    Then you HTML code in the post:
    HTML Code:
    <img src="URL-to-the-image" etc.... class="alignleft" />
    Make a similar class for "alignright" - just change the margins from right to left. BTW, when you have 4 values they refer to this order:
    top - right - bottom - left
    Signature

    {{ DiscussionBoard.errors[2974343].message }}
    • Profile picture of the author JKing
      Try this for quick testing, then move all the styles into a style sheet when you have it where you want it:

      Code:
      <img src="wpimageex.png" style="float:left;margin:0px 10px -50px 0px;"> Your text/link here.
      Or...

      You could try this.

      Create a full blown WordPress theme from any webpage or free template you want. Your choices are virtually UNLIMITED.

      Turbo Flex Pro Theme Master - WordPress Edition

      It's fast, easy, and you'll never have to pay for a theme ever again.

      Just a thought.

      John King
      Signature
      Turbo Flex Pro Theme Master - Turn Single Templates and Webpages Into Complete WordPress Blogs!
      {{ DiscussionBoard.errors[2980314].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by JKing View Post

        <img src="wpimageex.png" style="float:left;margin:0px 10px -50px 0px;"> Your text/link here.
        Since you seem to know what you are talking about.... why the minus 50px for bottom-margin?


        [Mods: this whole thread should be moved to the Web Design subforum...]
        Signature

        {{ DiscussionBoard.errors[2981422].message }}
        • Profile picture of the author JKing
          Hello Istvan,

          Now that I thnk of it, you are right for asking that question. I was thinking "try to get the text moved up", but the float:left would have moved the text all the way up anyway. So my solution is not viable here. Sorry if I messed you up cooler1.

          Good catch Istvan. I suppose even a veteran web developer can blow it sometimes too. :rolleyes:

          Cooler1,
          Maybe try this then...

          Code:
          <img src="wpimageex.png" style="float:left;margin:0px 10px 0px 0px;"><p style="margin:50px 10px 0px 0px;">Your text/link here.</p>
          Adjust the 50px setting on the paragraph tag until placement of the text is where you need it in relation to the image.

          John
          Signature
          Turbo Flex Pro Theme Master - Turn Single Templates and Webpages Into Complete WordPress Blogs!
          {{ DiscussionBoard.errors[2982698].message }}

Trending Topics