Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image not effected by style???

Status
Not open for further replies.

GabberGod

IS-IT--Management
Nov 16, 2003
73
AU
ok what i have is am img and a heading.

i want the image to sit at the top right of the of the line of text. I can do right with standard align.

but im trying to use css to place the img (id=top_pic) at a specific location on the page.

here is the html

<table width=&quot;450&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;450&quot;>

<h1>Heading</h1>
<img src=&quot;../images/Mainteck%20Logo%20small.jpg&quot; name=&quot;top_pic&quot; width=&quot;214&quot; height=&quot;90&quot; id=&quot;top_pic&quot;>
<h6> </h6>
<p> </p>

here is the style code

#top_pic {
position: absolute;
top: 20;
right: 200;
}
 
Can you tell us exactly what it's not doing right? I tried your code and the image was indeed placed somewhere to the right of the h1. Your code says the image should be 200 pixels from the right. Maybe if you instead change right to left you'll get more what I'm guessing you were looking for.

 
In CSS it is better (other browser than IE will probably consider it mandatory) to specify the unit. So you need to specificly type 200px and 20px for an expected result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top