Help! Problem with Image Margins in IE vs. Firefox
-
Hi,
I add images through the WordPress admin and align them either left or right. I would like padding on the left when they are aligned right and padding on the right when they are aligned left so that the text doesn’t touch the image itself.
I have had some success. The site looks fine in Firefox but not in Internet Explorer (IE).
Here is the site: https://approachanxiety.com
For some reason, adding WordPress’s recommended code for this to my CSS file does not seem to work. Here is the code WordPress recommends:
img.right { padding: 4px; margin: 0 0 2px 7px;
display: inline; }
img.left { padding: 4px; margin: 0 7px 2px 0; display: inline; }
.right { float: right; }
.left { float: left; }
Here is the relevant code in my CSS file:
#content .articleimg {
padding: 0px;
margin: 3px 3px 1px 10px;
display: inline;
border: none;
}
#content .articleimgleft {
padding: 0px;
margin: 3px 10px 1px 3px;
display: inline;
border: none;
}
p img {
padding: 0;
max-width: 100%;
}
.alignright {
float: right;
}
.alignleft {
float: left;
}
img.alignright, img[align="right"] {
padding: 0px;
margin: 3px 3px 1px 10px;
display: inline;
border: none;
}
img.alignleft, img[align="left"] {
padding: 0px;
margin: 3px 10px 1px 3px;
display: inline;
border: none;
}
Yeah, I don’t know exactly what I’m doing, I’m just messing around with a template.
Here is my CSS file:
https://approachanxiety.com/wp-content/themes/Approach%20Anxiety/style.cssAny help would be appreciated.
- The topic ‘Help! Problem with Image Margins in IE vs. Firefox’ is closed to new replies.