<div> dimensions help

I have a div that is 940px wide. Inside this div I have two images that I want to appear side by side. Both of the images have a width of 470px, but the second image keeps getting pushed down to the next line.

I’ve set all the margins and padding to zero, but it still won’t work.
The only way I can get them to be next to each other is if I add 3px to the div width.

What am I doing wrong?

Welcome to Sitepoint.

It may be that the div or imgs are inheriting CSS properties from elsewhere. A link to your page or the full HTML and CSS code would be useful (if posting code, please use the Select Syntax highlighting function in the message toolbar so that it formats tidily :slight_smile: ).

Here’s the page that I’m trying to update.
E-Z UP Custom Instant Shelters | International E-Z UP, Inc.
I apologize in advance that the CSS is a mess from a previous designer. I’m still in the process of finding and organizing all of that stuff.

The whitespace between the anchors causes a gap. Remove the whitespace and they’ll fit.

Awesome! Thank you so much. Of course I feel like an idiot when I see how simple the solution is, but at least I learned something. Thanks again!

Alternatively, float the anchors left:

#customgraphicsbg a {

Thanks, Victorinox. I’ll put that one in my notes for next time.