?
Solved

Position Image

Posted on 2011-02-19
5
Medium Priority
?
244 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
[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
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 84

Accepted Solution

by:
Dave Baldwin earned 668 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 664 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 668 total points
ID: 34936247
if it is absolute, do not float it. give it a
top: 0px;
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

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