Top-Aligning Text With Image
-
Hello,
Here’s my page: http://www.achieveitcoaching.com/
I’m trying to alight the Recent Posts and Recent Comments at the bottom of the page with the image that’s next to it.
It’s aligned but I want the image to be aligned with the top of the text not the bottom, how can I make it go higher?
I’m using “Widgets on Pages” to insert the widgets into the page content.
Any ideas are welcome, thanks.
-
Why are you using tables for layout? That’s really not good practice.
Hopefully you are not modifying theme files – as your changes will be lost when the theme is updated. You should be using a Child Theme or custom CSS.
The alignment question is due to CSS on the table – once you’ve set up custom CSS or a child theme, try adding this:
.entry-content td { vertical-align: top; }That might have other consequences, so do test it.
Wow you’re a genius, that made the image go up, but now the “Recent Posts” looks a bit lower, is there something I can modify for that as well?
Thanks for the tips, I’ll be sure to lookup making a child theme once I’m done this this.
There’s not going to be a way to apply that to one table cell and not another – that’s another reason to not use tables for layout.
Also, making a child theme later is going to require redoing some of your work – so better to do it before you start doing any work on a site…
Ok. So if I don’t use the table there, how else can I format it?
Actually, this CSS will work on that image:
img.wp-image-268 { margin-top: 20px; }BUT CSS is still a much better way to do layout…you can use divs and float to position them.
Thank you AN 🙂 – was just looking around for some of those articles…LOL!
Hello, thanks for your reply.
What do I put instead of img.wp-image-268? I added that to the stylesheet but it didn’t do anything, I suspect I have to link it to that image specifically or what?
Thanks
The topic ‘Top-Aligning Text With Image’ is closed to new replies.