Solved

Photo in A Div

Posted on 2014-10-18
3
80 Views
Last Modified: 2014-10-18
I am trying to put a photo in a div and its not staying in the div.

 <div class="container_12 top-1">
       	<a href="homeerase.html"><div id="zoom_img" class="grid_4 box-1">
        	I've put too much<br>
            personal information<br>
            on the Internet!<br>
            Can I get it back?
        </div></a>

Open in new window


#zoom_img{
    width:250px;
    height:150px;
    border:5px solid gray;
    border-radius:15px;
	background:#FFF;
	font-family:Arial, Helvetica, sans-serif;
	color:#000;
	font-weight:bold;
	font-size:20px;
	padding-top:40px;
	padding-right:10px;
	/*padding-bottom:20px;*/
	padding-left:30px;
}

Open in new window

0
Comment
Question by:DS928
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40389447
Whats the CSS for container_12 and top-1

You probably need to add overflow:auto to one of the classes
0
 

Author Comment

by:DS928
ID: 40389454
A little complex.  So I attached the file.  Here is the link

www.davidschure.com

Trying to get the photo in the rounded rectangle with the writing on top.  Maybe I'm making this more complicated than it needs to be!
grid-12.css
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40389458
To #zoom_img
Change the height to
height:auto

and add
min-height:150px
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question