Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
325 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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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 84

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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 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 …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

722 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