Solved

floating an image over site using absolute positioning

Posted on 2014-02-12
2
262 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
2 Comments
 
LVL 8

Accepted Solution

by:
Adrian Crabtree earned 500 total points
Comment Utility
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
Comment Utility
Hallelujah!

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 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

12 Experts available now in Live!

Get 1:1 Help Now