Solved

Position Image

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

757 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