troubleshooting Question

Unable to get images centered

Avatar of rmmarsh
rmmarshFlag for United States of America asked on
CSSHTML
6 Comments3 Solutions323 ViewsLast Modified:
I have a site that has 2 images.  I want to place them one on top of the other, with the text to the right, as shown in the first image.  I want to do the same for the 2nd image below, but can't get my CSS to work properly.

This is my CSS:
#storeImage1  {
  float: left;
  margin-top: 50px; 
  margin-left: 50px;
 <!--  margin-bottom: 100px; 
 border: 2px solid black; -->
 }

#storeAddress1 {
  font-size: 16px;
  float: right;
  margin-top: 75px;
  margin-right: 160px;
 }

#storeImage2  {
float: left;
margin-left: 0px;
margin-top: 50px;
 <!--  margin-bottom: 100px; 
 border: 2px solid black; -->
 }

#storeAddress2 {
   font-size: 16px;
  float: right;
  margin-top: 275px;
  margin-right: 160px;
 }

and this is the HTML that creates the two images:

<div id="storeImage1"><img src="uploads/images/e-cigs%20store%20front%20-%20Spokane.png" alt="" width="396" height="258" /></div>
<div id="storeAddress1">
<h2><span style="text-decoration: underline;">Northside location</span><br />9301-A North Division<br /> (North of KFC)<br /> Spokane, WA 99218<br /><br /> 509-465-2695</h2>
<p> </p>
<p> </p>
</div>
<div id="storeImage2"><img src="uploads/images/e-cigs%20092_259x346.png" alt="" width="259" height="346" /></div>
<div id="storeAddress2">
<h2><span style="text-decoration: underline;">Thierman location</span><br /> 21 South Thierman<br /> (Between Sprague and Appleway) <br /><br /> 509-795-8147</h2>
</div>

Can someone please tell me what I'm doing wrong? (btw, I'm a newbie at CSS).

I appreciate it...
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros