Eliminate image padding & margins
-
This isn’t my first WP site, but it’s been a while and of course the first simple thing I tried to do turns into a solid brickwall. 🙂 I’m a bit rusty, but can figure out my way around CSS and PHP.
I’m trying to align 3 images side by side, next to each other, with zero margin, padding or borders between them. So far, everything I tried didn’t work.
http://drewlahat.com/lhtwp/front-page/Attempt #1 is inline CSS, and #2 is a table. As you can see I’m just using the basic Twenty Fourteen theme. Tried the same code in a fresh page in Dreamweaver and it yields very different (and the desired) results. So it’s WP injecting something, or the interaction with the theme elements…? Tried inspecting the DOM in Chrome, no insights. So it’s driving me nuts…
Source code for the above:
<img style="float: left; margin: 0px;" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Shoot.jpg" alt="Main_Shoot" width="300" height="600" /><img style="float: left; margin: 0px;" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Post.jpg" alt="Main_Post" width="300" height="600" /><img style="float: left; margin: 0px;" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Solve.jpg" alt="Main_Solve" width="300" height="600" /> <table style="width:900px; border:none; border-collapse: collapse; margin: 0px; padding: 0px;"> <tr><td style="margin: 0px; padding:0x;"> <img class="size-full wp-image-39" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Shoot.jpg" alt="Main_Shoot" width="300" height="600" /> </td> <td style="margin: 0px; padding:0x;"> <img class="wp-image-38 size-full" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Post.jpg" alt="Main_Post" width="300" height="600" /> </td> <td> <img class="size-full wp-image-40 side-by-side" src="http://drewlahat.com/lhtwp/wp-content/uploads/2016/02/Main_Solve.jpg" alt="Main_Solve" width="300" height="600" /></p> </td></tr></table>Much appreciated.
The topic ‘Eliminate image padding & margins’ is closed to new replies.