Solved

floating an image over site using absolute positioning

Posted on 2014-02-12
2
288 Views
Last Modified: 2014-02-12
I work on a mac. Trying to get he display cabinet (on right) to float over navigation bar and image of man working.  I got it to sit nice in some browsers but in other browsers, it goes off the page.  Any advice on keeping the display actually on the website (and not on the wood background)?

http://nsitedesigns.com/nsitedesigns/lakeshore/test.html

Safari screenshot
http://screencast.com/t/HWi2pAq6Q

Chrome screenshot
http://nsitedesigns.com/nsitedesigns/lakeshore/test.html

Firefox screenshot
http://nsitedesigns.com/nsitedesigns/lakeshore/test.html
test.html
0
Comment
Question by:nsitedesigns
[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 Comments
 
LVL 8

Accepted Solution

by:
Adrian Crabtree earned 500 total points
ID: 39853939
Hi nsitedesigns,

You need to set your .container to a position: relative. This will then give a bounding box for the img you want to position absolute. Your new CSS for .display and .container would be this:

.container {
  width: 946px;
  background-color: #FFF;
  margin: 40px auto;
  position: relative;
}
.display {
  position: absolute;
  top: 90px;
  right: 20px;
}

Open in new window

0
 

Author Comment

by:nsitedesigns
ID: 39853980
Hallelujah!

Should have asked hours ago.  I have been futzing with it for about 2 hours.  Thanks again!
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

636 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