Jump to content

Three images below each other WITHOUT little white boarder line possible?


Team On

Recommended Posts

Hi guys, this is a rather technical question. In my listing, I would like to have 3 images below each other. https://www.geocaching.com/geocache/GC7HJAM_money-money-money

In this listing, there is orange, blue, green below each other, but unfortunately there is a little white line between them. How can I get rid of this with HTML? There should not be any space, white line, black line etc. between.

Thanks for any ideas!

Edited by Team On
Link to comment

This is one way to fine tune your image positions:

<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRp8iHH5qhW4LBsHzxE8U9i-WEO7CK7BFEXFPqw2GkivuxZLqti" /><br />
<img src="https://upload.wikimedia.org/wikipedia/commons/e/e4/Color-blue.JPG" style="position:relative;top:-20px;" /><br />
<img src="https://image.slidesharecdn.com/masqueofthereddeathsymbolismpresentation-140723140437-phpapp02/95/masque-of-the-red-death-color-symbolism-3-638.jpg" style="position:relative;top:-40px;" />

Actually this makes those images to overlap so there is nothing between them.

Link to comment

Awesome!!! You accidently even solved another question I was thinking about! I wanted to put a Gif animation with transparency in some places over a background jpg. Now I was able to partly put a Gif animation with transparent background in front of the blue jpg. I could surely manually play with the -20px  and the width and length values until Gif and jpg are 100% over each other, but is there also some easy automatic command for that?

<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRp8iHH5qhW4LBsHzxE8U9i-WEO7CK7BFEXFPqw2GkivuxZLqti" /><br />
<img src="https://upload.wikimedia.org/wikipedia/commons/e/e4/Color-blue.JPG" style="position:relative;top:-20px;" /><br />
<img src="https://s14.postimg.org/o61el2wup/qm400turn.gif" style="position:relative;top:-200px;" />

Link to comment

Here are some more complicated examples.   https://coord.info/GC46BX5

Watch the geochecker banner for a minute :) here you can see an example of animated transparent gif over png. More transparent images are placed over the main image.

To get things synchronized correctly you can make a zero height DIV to move anything where you want without messing rendering of other parts at all.

<div style="position:relative;top:-52px;left:547px;height:0px;">

 

Edited by arisoft
Link to comment
2 hours ago, Team On said:

Thanks arisoft! I take it if I try to have a nice background png with an animation Gif over it it well be displayed correctly in the common browsers?

I have noticed no problems.This is a very basic CSS function and should be pixel perfect adjustment. It works also with mobile browsers.

Link to comment

Yeah here are a couple things to know...

The images are much larger than the width of the listing, so the website shrinks them and assumes you want to be able to click and zoom to the larger size - that's why there's the magnifying glass and the spacing.

* If you don't care about the zoom option (it's not all that necessary unless someone has to be finding really really small details in an image and isn't sure how to view and zoom in on web page or embedded image) then:

1. You can add width="100%" to the img tag (ie: <img src="..." width="100%" /> ) and that will shrink the image to the listing width before the code makes it a magnifier

2. You can add style="display:block;" to the img tag (ie: <img src="..." style="display:block;" /> ) to get rid of any extra spacing there may be around or below the image. This will put the image on its own line though, nothing to the left or right, without additional coding.

Basically for 3 full width images fitting snug vertically in the listing which adapts to whatever is showing the description, I'd go with both 1 and 2:

<img src="..." width="100%" style="display:block;" />

Quickest and easiest way to accomplish what (it sounds like) you're looking for.  Using CSS positioning by pixels could get problematic depending on users' browsers an what default style or accessibility settings they may have.

You can play with simplified positioning and widths using tables and css floats and other relatively basic html markup. But the above I think would be sufficient to get around Groundspeak's html sanitizing.

Edited by thebruce0
  • Upvote 1
Link to comment

This works when I tested in my own cache.

<div style="height:400px;width:400px;background-color:#808000;background-repeat:no-repeat;background-image:url(https://www.thenational.ae/image/policy:1.692075:1514817351/lf-key-ingredient.jpg);"><img src="https://s14.postimg.org/o61el2wup/qm400turn.gif" /></div>

 

Link to comment
2 hours ago, arisoft said:

This works when I tested in my own cache.

Ya, I was trying to keep the complex coding to a minimum for a basic and flexible display ;)

Listing width, any height, no outer padding, no magnifying glass:

<img src="url" width="100%" style="display:block;"/> 

Done! B)

Edited by thebruce0
Link to comment

Yeah, I agree. I was playing around and noticed, that the question mark rotating inside the attributes next to the <1 km attribute gets moved downwards its box when zooming into the whole screen. https://www.geocaching.com/geocache/GC7HJAM_money-money-money

1.It would be cool if it stayed inside the box no matter what, at least in windows on a computer, but I guess there is nothing I can do about it? 

2. This is the "code" for it. 

<div style="position:relative;top:-4217px;;left:835px;"><img width="27" height="26" src="https://s14.postimg.org/o61el2wup/qm400turn.gif" /></div></span>

It is apparently as it says "relative" to its position in the text near the geochecker. If there was no -4217px;;left:835px , it would appear near the geochecker. However, if later I put in new stuff anywhere above the geochecker and everything gets moved down, the rotating qm will be way down of that little attribute box as well. Therefore instead of relative to the position in the html, I would prefer it being "absolute and independent" to the whole html. Of course just starting the html part with it (instead of inserting at the end behind the geochcker) would be the apparent work around to acoid it being affected by later editing, but I am just curious if an independent from the html solution, maybe just depending on the maximum top of the screen would also be possible (Jesus, I make it sound really complicated, I don't know how to describe better, hope it is understandable:)).

 

Edited by Team On
Link to comment

Yes, unfortunately the santizing of the description HTML removes the position:absolute CSS option, so elements can only be positioned relative to the description container, which means shifting with everything that shifts with the top of the description box element.

It's already a risk anyway, since designing the html that way makes its reception very limited - devices that don't display more advanced html or styling may have difficulty with it. It's not the best style of puzzling or cache listing design; it's really just more of a gimmick than anything, which takes advantage of an aesthetic loophole in the allowance of HTML and some CSS in the cache listing.

Link to comment

In the listing it works good to offset an images with 

style="position:relative;top:-190px;;left:223px;">

, however in geocheck.org it is disabled? Was trying with the usual pc browsers. It just displayed the offseted image below the other image, like Cgeo would with a listing.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...