Solved

Position Image

Posted on 2011-02-19
5
243 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 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

695 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