Solved

Position Image

Posted on 2011-02-19
5
236 Views
Last Modified: 2013-11-19
I am working on a website thats not mine and I am having a problem trying to float a image to the right side of the page. The below code is what I am using now and its making the image jumps down about 240px but it does got tthe absolute right now how do I get it to the top?I want it to be on the absolute right hand top corner of the website.

#HeaderImage
{
    margin:0px;
    height:150px;
    width:692px;
      float: right;
      
}
0
Comment
Question by:smphil
5 Comments
 
LVL 4

Expert Comment

by:andreizz
ID: 34934451
also add clear: both; option
if it does not work post your html structure and additional css
0
 
LVL 10

Expert Comment

by:10023
ID: 34934579
Has to be previous div behavior..cannot duplicate your problem
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 34934593
There is probably not enough space from the previous 'div' to put yours beside it.  If your overall width is 1000px and the floated div before yours has a width of 400px, that only leaves 600px and your div would be too wide to fit there.
0
 
LVL 29

Assisted Solution

by:fibo
fibo earned 166 total points
ID: 34936158
Can yo post the html and css info that precedes your right-aimed portion?

If it goes down, it is because it does not have enough space to stay in the top, so your surrounding code is needed.
Looking at your values (150, 190, 692) I would suspect that you have some 40px-height element with a width such that width+692px > window display width

I suggest you install xray in your browser (just a javascript bookmarklet that does not load too much the browser) and look at the different blocks with Xray.
Xray: http://www.westciv.com/xray/
0
 
LVL 27

Assisted Solution

by:Lukasz Chmielewski
Lukasz Chmielewski earned 167 total points
ID: 34936247
if it is absolute, do not float it. give it a
top: 0px;
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 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

22 Experts available now in Live!

Get 1:1 Help Now