Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.computer > #10623 > unrolled thread

HTML coding help?

Started byRobert Baer <robertbaer@localnet.com>
First post2017-12-12 01:51 -0800
Last post2017-12-14 14:14 -0800
Articles 7 — 2 participants

Back to article view | Back to alt.computer


Contents

  HTML coding help? Robert Baer <robertbaer@localnet.com> - 2017-12-12 01:51 -0800
    Re: HTML coding help? JJ <jj4public@vfemail.net> - 2017-12-13 06:56 +0700
      Re: HTML coding help? Robert Baer <robertbaer@localnet.com> - 2017-12-12 18:23 -0800
        Re: HTML coding help? JJ <jj4public@vfemail.net> - 2017-12-13 20:15 +0700
          Re: HTML coding help? Robert Baer <robertbaer@localnet.com> - 2017-12-13 17:52 -0800
            Re: HTML coding help? JJ <jj4public@vfemail.net> - 2017-12-15 00:29 +0700
              Re: HTML coding help? Robert Baer <robertbaer@localnet.com> - 2017-12-14 14:14 -0800

#10623 — HTML coding help?

FromRobert Baer <robertbaer@localnet.com>
Date2017-12-12 01:51 -0800
SubjectHTML coding help?
Message-ID<SENXB.16750$tN.13475@fx37.iad>
   I have a number of GIF maps of the world, each with one spot 
identified with a marker, and one map with no marker.

   Using HTML,i was able to find the X,Y location for each marker, and 
would like to add my own markers to the no-marker map.

   Boils down to adding a small picture "on top" of a map/display a 
number of times (map then having measles).

   How?

   Thanks.

[toc] | [next] | [standalone]


#10625

FromJJ <jj4public@vfemail.net>
Date2017-12-13 06:56 +0700
Message-ID<1mp9a5iurgrz0.7t6zuzgegp2m$.dlg@40tude.net>
In reply to#10623
On Tue, 12 Dec 2017 01:51:45 -0800, Robert Baer wrote:
>    I have a number of GIF maps of the world, each with one spot 
> identified with a marker, and one map with no marker.
> 
>    Using HTML,i was able to find the X,Y location for each marker, and 
> would like to add my own markers to the no-marker map.
> 
>    Boils down to adding a small picture "on top" of a map/display a 
> number of times (map then having measles).
> 
>    How?
> 
>    Thanks.

One way is like below. A smiley icon (as the marker) is placed on London on
the map. Keep in mind that the icon coordinate is relative to the top-left
of the map image container element (with mapHolder class), and it points to
top-left of the icon (not the center of the icon), so you'll have to adjust
the icon position using margins like defined by the `.marker` CSS class.
FYI, the icon image dimension is 19x19, so it's adjusted to (-10, -10).

  <style>
    .mapHolder {
      position: relative;
    }
    .map {
      width: 740px;
      height: 600px;
    }
    .marker {
      position: absolute;
      left: 201px;
      top: 268px;
      margin: -10px 0 0 -10px;
    }
  </style>
  <div class="mapHolder">
    <img
       class="marker"
       src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
    />
    <img class="map" src="http://geology.com/world/europe-map.gif" />
  </div>

Take care if you use any border and/or padding for the map holder element
including any element within, because the with of the border/padding will
affect the map holder element's dimension.

[toc] | [prev] | [next] | [standalone]


#10626

FromRobert Baer <robertbaer@localnet.com>
Date2017-12-12 18:23 -0800
Message-ID<oa0YB.66088$nX4.2259@fx06.iad>
In reply to#10625
JJ wrote:
> On Tue, 12 Dec 2017 01:51:45 -0800, Robert Baer wrote:
>>     I have a number of GIF maps of the world, each with one spot
>> identified with a marker, and one map with no marker.
>>
>>     Using HTML,i was able to find the X,Y location for each marker, and
>> would like to add my own markers to the no-marker map.
>>
>>     Boils down to adding a small picture "on top" of a map/display a
>> number of times (map then having measles).
>>
>>     How?
>>
>>     Thanks.
>
> One way is like below. A smiley icon (as the marker) is placed on London on
> the map. Keep in mind that the icon coordinate is relative to the top-left
> of the map image container element (with mapHolder class), and it points to
> top-left of the icon (not the center of the icon), so you'll have to adjust
> the icon position using margins like defined by the `.marker` CSS class.
> FYI, the icon image dimension is 19x19, so it's adjusted to (-10, -10).
>
>    <style>
>      .mapHolder {
>        position: relative;
>      }
>      .map {
>        width: 740px;
>        height: 600px;
>      }
>      .marker {
>        position: absolute;
>        left: 201px;
>        top: 268px;
>        margin: -10px 0 0 -10px;
>      }
>    </style>
>    <div class="mapHolder">
>      <img
>         class="marker"
>         src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
>      />
>      <img class="map" src="http://geology.com/world/europe-map.gif" />
>    </div>
>
> Take care if you use any border and/or padding for the map holder element
> including any element within, because the with of the border/padding will
> affect the map holder element's dimension.
>
   This has been of help; at least a marker can be placed wherever i 
like (BIG advance), as follows:

         <!-- NOTES
   mapHolder height, width values are ignored. Actual size of map image 
is used in "map" line.
   Vertical offset changed by 150px due to mapHolder offset and comments 
not allowed in style declaration.
          -->
   <style>
     .mapHolder { position: absolute; height: 600px; width: 800; top: 
-150px; left: -2px }
     .map { height: 768px; width: 1024px; }
     .marker201 { position: absolute; left: 943px; top: 592px;
     .marker202 { position: absolute; left: 241px; top: 402px;
     }
   </style>

   <div class="mapHolder">  <!--  "alt" used primarily for map location 
comment.-->
     <img class="map" src="WorldMap.gif" />
     <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015 
Australia.gif" />
     <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
   </div>

   However, fiddling has shown that only the first marker is recognized.

   Is there a trick to get a number of markers?
   Thanks.

[toc] | [prev] | [next] | [standalone]


#10627

FromJJ <jj4public@vfemail.net>
Date2017-12-13 20:15 +0700
Message-ID<ey412axgct4v$.5vym4kpqs9yb$.dlg@40tude.net>
In reply to#10626
On Tue, 12 Dec 2017 18:23:15 -0800, Robert Baer wrote:
>    This has been of help; at least a marker can be placed wherever i 
> like (BIG advance), as follows:
> 
>          <!-- NOTES
>    mapHolder height, width values are ignored. Actual size of map image 
> is used in "map" line.
>    Vertical offset changed by 150px due to mapHolder offset and comments 
> not allowed in style declaration.
>           -->
>    <style>
>      .mapHolder { position: absolute; height: 600px; width: 800; top: 
> -150px; left: -2px }
>      .map { height: 768px; width: 1024px; }
>      .marker201 { position: absolute; left: 943px; top: 592px;
>      .marker202 { position: absolute; left: 241px; top: 402px;
>      }
>    </style>
> 
>    <div class="mapHolder">  <!--  "alt" used primarily for map location 
> comment.-->
>      <img class="map" src="WorldMap.gif" />
>      <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015 
> Australia.gif" />
>      <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
>    </div>
> 
>    However, fiddling has shown that only the first marker is recognized.
> 
>    Is there a trick to get a number of markers?
>    Thanks.

The `position: relative` style of the map holder is important.

Place the marker elements *before* the map. There's a big difference between
the two, which affect the placement of the following element.

With your current code, the markers may be placed outside of the map holder
element.

[toc] | [prev] | [next] | [standalone]


#10628

FromRobert Baer <robertbaer@localnet.com>
Date2017-12-13 17:52 -0800
Message-ID<NPkYB.2$mG5.1@fx10.iad>
In reply to#10627
JJ wrote:
> On Tue, 12 Dec 2017 18:23:15 -0800, Robert Baer wrote:
>>     This has been of help; at least a marker can be placed wherever i
>> like (BIG advance), as follows:
>>
>>           <!-- NOTES
>>     mapHolder height, width values are ignored. Actual size of map image
>> is used in "map" line.
>>     Vertical offset changed by 150px due to mapHolder offset and comments
>> not allowed in style declaration.
>>            -->
>>     <style>
>>       .mapHolder { position: absolute; height: 600px; width: 800; top:
>> -150px; left: -2px }
>>       .map { height: 768px; width: 1024px; }
>>       .marker201 { position: absolute; left: 943px; top: 592px;
>>       .marker202 { position: absolute; left: 241px; top: 402px;
>>       }
>>     </style>
>>
>>     <div class="mapHolder">  <!--  "alt" used primarily for map location
>> comment.-->
>>       <img class="map" src="WorldMap.gif" />
>>       <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015
>> Australia.gif" />
>>       <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
>>     </div>
>>
>>     However, fiddling has shown that only the first marker is recognized.
>>
>>     Is there a trick to get a number of markers?
>>     Thanks.
>
> The `position: relative` style of the map holder is important.
>
> Place the marker elements *before* the map. There's a big difference between
> the two, which affect the placement of the following element.
>
> With your current code, the markers may be placed outside of the map holder
> element.
>
   When i changed to Relative, i had to increase the offset by 50.
   Other than that, the new code acted in the same only-one marker way.

   <style>
     .mapHolder { position: relative; height: 600px; width: 800; top: 
-200px; left: -2px }
     .map { height: 768px; width: 1024px; }
     .marker201 { position: relative; left: 943px; top: 592px;
     .marker202 { position: relative; left: 241px; top: 402px;
     }
   </style>

   <div class="mapHolder">  <!--  "alt" used primarily for map location 
comment.-->
     <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015 
Australia.gif" />
     <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
     <img class="map" src="WorldMap.gif" />
   </div>

   Any other ideas?
   Thanks.

[toc] | [prev] | [next] | [standalone]


#10635

FromJJ <jj4public@vfemail.net>
Date2017-12-15 00:29 +0700
Message-ID<ytr7vqxd2hkm$.13fbph51ng2e9$.dlg@40tude.net>
In reply to#10628
On Wed, 13 Dec 2017 17:52:45 -0800, Robert Baer wrote:
>    When i changed to Relative, i had to increase the offset by 50.
>    Other than that, the new code acted in the same only-one marker way.
> 
>    <style>
>      .mapHolder { position: relative; height: 600px; width: 800; top: 
> -200px; left: -2px }
>      .map { height: 768px; width: 1024px; }
>      .marker201 { position: relative; left: 943px; top: 592px;
>      .marker202 { position: relative; left: 241px; top: 402px;
>      }
>    </style>
> 
>    <div class="mapHolder">  <!--  "alt" used primarily for map location 
> comment.-->
>      <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015 
> Australia.gif" />
>      <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
>      <img class="map" src="WorldMap.gif" />
>    </div>
> 
>    Any other ideas?
>    Thanks.

You've changed too many from the initial code. Element ordering, and
positioning styles affect heavily on the rendered layout.

Use below code as a base. And don't change any which may affect the above
mentioned.

   <style>
     .mapHolder { position: relative; }
     .map { height: 768px; width: 1024px; }
     .marker201 { position: absolute; left: 490px; top: 110px; }
     .marker202 { position: absolute; left: 670px; top: 380px; }
   </style>

   <div class="mapHolder">  <!--  "alt" used primarily for map location 
comment.-->
     <!-- insert any additional marker(s) here -->
     <img class="marker201"
src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
alt="Alexandria NSW 2015 
Australia.gif" />
     <!-- insert any additional marker(s) here -->
     <img class="marker202"
src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
alt="ANGLETON TX 77515.gif" />
     <!-- insert any additional marker(s) here -->
     <img class="map" src="http://geology.com/world/europe-map.gif" />
     <!-- don't insert any marker here -->
   </div>

If you want to adjust the map holder element position, wrap it with another
element (as a parent element), then move the wrapper element. Don't move the
map holder element, because it has a relative positioning.

For the above code, the dimension of the map element defines the height of
the map holder element. Currently, the map holder element's width spans to
the current maximum available layout space. If you don't want this (i.e.
make its width the same as map element's width), apply `display:
inline-block` style to the map holder element.

[toc] | [prev] | [next] | [standalone]


#10636

FromRobert Baer <robertbaer@localnet.com>
Date2017-12-14 14:14 -0800
Message-ID<EJCYB.974$gy4.570@fx35.iad>
In reply to#10635
JJ wrote:
> On Wed, 13 Dec 2017 17:52:45 -0800, Robert Baer wrote:
>>     When i changed to Relative, i had to increase the offset by 50.
>>     Other than that, the new code acted in the same only-one marker way.
>>
>>     <style>
>>       .mapHolder { position: relative; height: 600px; width: 800; top:
>> -200px; left: -2px }
>>       .map { height: 768px; width: 1024px; }
>>       .marker201 { position: relative; left: 943px; top: 592px;
>>       .marker202 { position: relative; left: 241px; top: 402px;
>>       }
>>     </style>
>>
>>     <div class="mapHolder">  <!--  "alt" used primarily for map location
>> comment.-->
>>       <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015
>> Australia.gif" />
>>       <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
>>       <img class="map" src="WorldMap.gif" />
>>     </div>
>>
>>     Any other ideas?
>>     Thanks.
>
> You've changed too many from the initial code. Element ordering, and
> positioning styles affect heavily on the rendered layout.
>
> Use below code as a base. And don't change any which may affect the above
> mentioned.
>
>     <style>
>       .mapHolder { position: relative; }
>       .map { height: 768px; width: 1024px; }
>       .marker201 { position: absolute; left: 490px; top: 110px; }
>       .marker202 { position: absolute; left: 670px; top: 380px; }
>     </style>
>
>     <div class="mapHolder">  <!--  "alt" used primarily for map location
> comment.-->
>       <!-- insert any additional marker(s) here -->
>       <img class="marker201"
> src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
> alt="Alexandria NSW 2015
> Australia.gif" />
>       <!-- insert any additional marker(s) here -->
>       <img class="marker202"
> src="https://www.smiley-lol.com/smiley/expressifs/yeux/panachy.gif"
> alt="ANGLETON TX 77515.gif" />
>       <!-- insert any additional marker(s) here -->
>       <img class="map" src="http://geology.com/world/europe-map.gif" />
>       <!-- don't insert any marker here -->
>     </div>
>
> If you want to adjust the map holder element position, wrap it with another
> element (as a parent element), then move the wrapper element. Don't move the
> map holder element, because it has a relative positioning.
>
> For the above code, the dimension of the map element defines the height of
> the map holder element. Currently, the map holder element's width spans to
> the current maximum available layout space. If you don't want this (i.e.
> make its width the same as map element's width), apply `display:
> inline-block` style to the map holder element.
>
   That helped a lot!
   I found that the map source MUST be a URL for more tha none marker to 
work.
   Results so far:

         <!-- NOTES
            note ordering
   mapHolder   height, width values are ignored.
   map         Actual size of map image is used.
   Vertical offset changed by 150px due to mapHolder offset and comments 
not allowed in style declaration.
   map class src MUST be via the web; else multiple marker overlays DO 
NOT work.
         -->

    <style>
      .mapHolder { position: relative; }
      .map { height: 768px; width: 1024px; }
      .marker201 { position: absolute; left: 943px; top: 592px; }
      .marker202 { position: absolute; left: 241px; top: 402px; }
      .marker203 { position: absolute; left: 236px; top: 249px; }
      .marker204 { position: absolute; left: 239px; top: 229px; }
      .marker205 { position: absolute; left: 236px; top: 257px; }
      .marker206 { position: absolute; left: 347px; top: 443px; }
      .marker207 { position: absolute; left: 347px; top: 444px; }
      .marker208 { position: absolute; left: 583px; top: 122px; }
    </style>

    <div id=div101 style="position: relative; top: -150px; left: -8px; " >
     <div class="mapHolder">  <!--  "alt" used primarily for map 
location comment.-->
      <img class="marker201" src="SPOT.gif" alt="Alexandria NSW 2015 
Australia.gif" />
      <img class="marker202" src="SPOT.gif" alt="ANGLETON TX 77515.gif" />
      <img class="marker203" src="SPOT.gif" alt="Austin TX 78578.gif" />
      <img class="marker204" src="SPOT.gif" alt="Broken Arrow OK 
74012.gif" />
      <img class="marker205" src="SPOT.gif" alt="Corpus Christi TX 
78408.gif" />
      <img class="marker206" src="SPOT.gif" alt="Esmeralda 1072 CABA 
Argentina.gif" />
      <img class="marker207" src="SPOT.gif" alt="Esmeralda 1080 Buenos 
Aries, Argentina.gif" />
      <img class="marker208" src="SPOT.gif" alt="FI-02151 ESPOO 
Finland.GIF" />
      <img class="map" src="https://oil4lessllc.com/images/WorldMap.gif" />
      <!-- don't insert any marker here -->
     </div>
    </div>

   BUT,,,
   Only he first 2 markers are vertically placed properly.
   Does not make sense to me.
   So i guess i must fudge the numbers accordingly.

   Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | alt.computer


csiph-web