Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Position Image

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

610 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