Solved

Position an image on a web page so that it shows up the same on different screen resolutions.

Posted on 2011-03-09
4
320 Views
Last Modified: 2012-05-11
Hi

I have been struggling four a while now trying to learn how to float images on web pages.

I want to float an image so it over laps a little bit of the mainContent div and then run down through the footer. I have been able to use absolute positioning to get the imgae to stick to the bottom but how do I keep it from floating to far to the left or right?

Right now I have it working great on screens set at 1024 * 768 but go to any higher a resolution or use a widescren and it floats off to the left or right.

Site can be viewed here and if there is anything else I can provide just let me know?

http://davidsons.net/wp4derek/

thanks
Matt
0
Comment
Question by:mld4165
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 35092493
Typically what we do is create a 'div' that contains all of the content in a fixed width box, often called 'wrap' or 'wrapper'.  Then all of the content stays in that 'wrap' container no matter what size the screen.  Kinda like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- 
#wrap {width:940px;margin-left:auto;margin-right:auto;} 
-->
</style>
</head>

<body class="oneColFixCtrHdr">
<div id="wrap">
<!-- beginning of wrap -->

  <div id="header">
  <a href="mailto:Julie@fieldstoneaudio.com?subject=More information requested."> <img id="emailicon" alt="Email Julie at:" height="46" src="images/emaillogo.png" width="46" /></a></div>
<!-- end #header -->

  </div>

	<div id="container">
	<div id="mainContent">
    <div id="redtxt">
		<p>Nearly 15 years ago, I was persuaded to record a radio spot for my restaurant, The Melodeon. The response was overwhelmingly positive, and I’ve been happily doing voiceovers ever since.</p>
	</div>
    	<hr />
			<div id="rightContent">

    		<p style="font-size:large">My client list includes:</p>
			<dl>
            <dt>Lexmark International</dt>
			<dt>Rolex 3 Day Event</dt>
			<dt>Conair Spa Products</dt>
			<dt>University of Kentucky Healthcare</dt>

			<dt>Lexington Clinic</dt>
			<dt>Republic Bank</dt>
			<dt>Milestone Realty</dt>
			<dt>Nationwide Insurance</dt>
			<dt>State Farm Insurance</dt>
			</dl>

    		</div>
	<h1>My voice is the perfect choice for the following:</h1>
	<ul id="ulist">
	<li>Upbeat, high energy and persuasive for retail and automotive.</li>
	<li>Soothing and reassuring for on hold messaging and voicemail systems.</li>
	<li>Warm and compassionate for heath care and physician specialties.</li>
	<li>Interesting and informative for documentaries and narratives.</li>

	<li>Sweet and Southern for regional flavor.</li>
	</ul>
	<hr style="clear:both" />
	<div id="demoicon">
	  <a href="Sound/JulieReedDemo2010.mp3">
      <img id="demoicon" alt="Please click here to listen to my demo:" longdesc="Please click here to listen to my demo:" src="images/demobckgrnd.png" /></a></p>
	  </div>
    <div id="tealtxt">

 <p>My friends locally at Dynamix Audio provide me with state of the art production services; including an ISDN equipped studio with a Neumann U-87 microphone.<br />
  You can visit them here at <a href="http://www.dxaudio.com">www.dxaudio.com</a>.<br />
  Lucky to live in the beautiful Bluegrass area, I am also available to travel to your studio of choice.<br />
  Please contact me, <a href="mailto:&#074;&#117;&#108;&#105;&#101;&#064;&#102;&#105;&#101;&#108;&#100;&#115;&#116;&#111;&#110;&#101;&#097;&#117;&#100;&#105;&#111;&#046;&#099;&#111;&#109;">Julie C. Reed</a> for a prompt, cost effective quote on your next project!</p>

  </div>
  <!-- end #mainContent -->
</div>
<!-- end #container -->
</div>
  <div id="footer">
    <p>Put images and links here.</p>
  <!-- end #footer -->
  <div id="micro">
  <img src="images/microphone.png">

  </div>
  </div>
<!-- end of wrap -->
</div>

</body>
</html>

Open in new window

0
 
LVL 1

Author Comment

by:mld4165
ID: 35099540
DaveBaldwin: thanks so much. I see what i was doing wrong now.
0
 
LVL 1

Author Closing Comment

by:mld4165
ID: 35099542
Thanks for the advice and solution.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35100860
You're welcome, thanks for the points.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

630 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