473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Relative position of image - how to remove gap

Hi,

My situation is i have a jpg on a webpage and want to overlay a png
over the top of it (which has transparent pixels, so bits of the jpeg
come through. I am doing this like this :

<img style="position:relative; TOP:180px; LEFT:150px;
WIDTH:50px; HEIGHT:50px" border="0" src="image1.png">
<img src="big_image.jpg"/>

Which is all ok (ive applied a fix to make png transparency work in
IE6), only there is a gap, where the png would naturally sit in the
flow of the document is consuming space even though its not there
anymore.

Is there anyway of collapsing this gep doen to nothing?
thanks,

Paul

Dec 14 '06 #1
1 8772
Hi,

Ive found a solution in case this helps anyone else, its probably not
the most elegent solution :

<img style="position:relative; TOP:0px; LEFT:380px; WIDTH:50px;
HEIGHT:50px; margin-right:-50px" border="0" src="3year-guarantee.png">

<img border="0" src="bmw1.jpg" width="440" height="330">

but ive basically added a negative right margin to the png, same value
as its width, so it is in effect not taking up any space.
pa**********@gmail.com wrote:
Hi,

My situation is i have a jpg on a webpage and want to overlay a png
over the top of it (which has transparent pixels, so bits of the jpeg
come through. I am doing this like this :

<img style="position:relative; TOP:180px; LEFT:150px;
WIDTH:50px; HEIGHT:50px" border="0" src="image1.png">
<img src="big_image.jpg"/>

Which is all ok (ive applied a fix to make png transparency work in
IE6), only there is a gap, where the png would naturally sit in the
flow of the document is consuming space even though its not there
anymore.

Is there anyway of collapsing this gep doen to nothing?
thanks,

Paul
Dec 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ken Kast | last post by:
Here's my situation. I have a statically positioned table that has an image in a cell. I also have some layers, defined by absolute-positioned DIVs for some animation. Everything works until I...
2
by: Stephen Weatherly | last post by:
Could anyone please help me with a problem I am having with my table widths??? If I have 2 images within a td tag, but using CSS relative positioning I position one over the top of the second (I...
4
by: boclair | last post by:
Is this a known problem with IE6? I have a provisional two column layout, the left menu column is positioned absolute. The contents column is positioned relative. The contents column has an...
1
by: Wilhelm Kutting | last post by:
Hi i like to make a complex layout with css. All the content is inside a container div. I like to get the following sequence without the css-layout: logo title mainnav content i can only...
1
by: alfred.taylor | last post by:
In reference to this page: http://www.celebration.org/cgi-bin/pd/pd.cgi?image=/pd/images/ShineEvite.jpg&config=shineconfig.txt I have it setup so that a "content" div contains the form and...
6
by: Gérard Talbot | last post by:
Hello fellow stylers, When trying this page http://www.gtalbot.org/BrowserBugsSection/PercentualRelativePositioning.html I get different rendered layouts with IE 6, IE 7 beta 2, Firefox...
4
by: dropdeadster | last post by:
Trying to line up a tic-tac-toe board type grid of images using style= tags to <img inside a table TD but it's not working, I get more like a set of steps, can I get an explanation of what's wrong...
2
by: Dale | last post by:
This seems like it should be simple and I am pretty sure I've done similar things a hundred times before but I sure can't seem to get it right this time. I have a GridView with a column of text...
3
by: Justin England | last post by:
Background: I am working for a client putting a textbook online. The layout of the textbook is straight forward and is easy enough to style with <h?>, <p>, <uland <oltags. The text book also...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.