Solved

Photo in A Div

Posted on 2014-10-18
3
74 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now