/r/HTML

Photograph via snooOG

A place to learn and ask questions on HTML, CSS, and general front end development.

Requesting help

If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:

Useful links

Related subreddits

/r/HTML

53,514 Subscribers

1

Destroyer

What is the password for the computer

1 Comment
2024/12/21
21:42 UTC

4

View Transitions Are More Powerful Than You Think

0 Comments
2024/12/21
18:05 UTC

0

If-else in JS (Resource, YT video)

Released the next part of front end development which is about boolean operations, Conditional Operators and if-else statements. I basically explained about the boolean and how you can perform different logic operations like AND, OR and NOT and also explained about the conditional operators (by taking a simple example of comparison of two numbers).

Check it out here:
https://youtu.be/-OcgYKqSmYQ

0 Comments
2024/12/21
18:00 UTC

1

Reposition video inside section

I have a video inside a section, but its not showing the part of the video i want. The video needs to be more on the right side. how do i do that?

I copied the code from a youtube video btw

HTML code:

  <header>
      <div class="section">
        <h1>Our Cafe</h1>

        <div class="video-container">
          <div class="color-overlay"></div>
          <video autoplay loop muted>
            <source src="video/Katze_streicheln.mp4">
          </video>
        </div>
      </div>
    </header>

css code:

.section  {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section h1 {
  text-align: center;
  font-size: 6rem;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  background: wheat;
  padding: 20px;
  margin: 15px;
  z-index: 1;
}



.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  background-color: lightblue;
  width: 100%;
  height: 100vh;
  filter: opacity(var(--value, 100%)); --value: 71%;
}
1 Comment
2024/12/21
13:04 UTC

0

Join our Community New Coders!

Hey everyone!

I’m part of a budding tech community for developers who are just starting out, and we’re looking for more folks to join us! Right now, we’re keeping it simple—it's all about connecting, learning together, and supporting one another as we grow in our coding journeys.

We don’t have any formal features yet, but here are some ideas we’re tossing around for the future:

  1. Coding help and advice

  2. Sharing code and feedback

  3. Weekly challenges to practice

  4. Curated resources to learn from

  5. Potential mentorship opportunities

  6. Voice or text-based coding sessions

  7. Tech news updates

  8. Roadmaps for growth

  9. Open-source collaborations

https://discord.gg/JmtVt9Xy

What do you think? Any ideas for features, resources, or ways to make the community better? Feel free to DM me if you’re interested in joining or have any thoughts! Let’s make this a great space for everyone to thrive.

We just started, so wait for the community to be more active with time.

1 Comment
2024/12/21
05:32 UTC

0

How are You to grow if you dont know what to do

If you been using tutorial to make a project to do list color picker etc. and your suppose to do it on your / make your own project how can you do it if you never done it, how do you know if you need to use a loop a function what methods to use etc.

3 Comments
2024/12/21
01:18 UTC

1

how to make ASCII art not convert into code

hi, im pretty new to coding and am trying to code a personal neocities site.

i am trying to put ASCII art into a header and have already tried using a <pre> tag to make it not convert into code to no avail. any advice? this is what the code looks like for my header at the moment:

https://preview.redd.it/nsmemo88ay7e1.png?width=1770&format=png&auto=webp&s=db046bfc6186d9c83f6d0abddce8d525b76cc12d

this is the ASCII art im trying to place, preferably instead of the "stella's site" that currently occupies the header title above:

I8 ,dPYb, ,dPYb, I8

I8 IP'`Yb IP'`Yb I8

88888888 I8 8I I8 8I gg 88888888

I8 I8 8' I8 8' "" I8

,g, I8 ,ggg, I8 dP I8 dP ,gggg,gg ,g, ,g, gg I8 ,ggg,

,8'8, I8 i8" "8i I8dP I8dP dP" "Y8I ,8'8, ,8'8, 88 I8 i8" "8i

,8' Yb ,I8, I8, ,8I I8P I8P i8' ,8I ,8' Yb ,8' Yb 88 ,I8, I8, ,8I

,8'_ 8) ,d88b, `YbadP' ,d8b,_ ,d8b,_ ,d8, ,d8b,,8'_ 8) ,8'_ 8) _,88,_,d88b, `YbadP'

P' "YY8P8P8P""Y8888P"Y8888P'"Y888P'"Y88P"Y8888P"`Y8P' "YY8P8P P' "YY8P8P8P""Y88P""Y8888P"Y888

\

any help would be much appreciated! thanks so much

3 Comments
2024/12/20
06:49 UTC

1

How do I align my flexboxes on the y-axis among the lines in the pictures? (yes i posst here far too much.

https://preview.redd.it/m1ebwp36vx7e1.png?width=1919&format=png&auto=webp&s=1719ef9f5b7d24e6d5fb73768e2dabe48268f6c0

https://preview.redd.it/kij4c256vx7e1.png?width=1885&format=png&auto=webp&s=ac202e82256931f6868060fc8d6b07a0c1413174

my html:
<!DOCTYPE html>
<html>
  <head>
    <title>Bot10Exists</title>


    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />


    <link rel="stylesheet" type="text/css" href="style.css" />
  </head>


  <body>
    <div class="greetings"><h1>Hello, stranger!</h1></div>


    <br />


    <div class="flex-container1">
      <div class="flex-box1">
        Socials <br />
        <hr />
        <ul>
          <li>
            <a href="https://www.twitch.tv/bot10exists">Twitch</a> (I plan to
            begin streaming Peggle and other casual games here in a few months.)
          </li>
          <li>
            <a href="https://www.youtube.com/@Bot10ExistsVODS">Youtube</a> (When
            I begin streaming, I plan to upload my VODs here.)
          </li>
          <li><a href>Reddit</a></li>
          <li><a href>Twitter</a></li>
          <li><a href>Steam</a></li>
          <li><a href>Bluesky</a></li>
        </ul>
      </div>
    </div>
    <div class="flex-container2">
      <div class="flex-box2"></div>
    </div>
    <div class="flex-container3">
      <div class="flex-box3">
        Version History
        <hr />
        <strong>2.0:</strong> Thursday, December 19, 2024 <br>
        After screwing around for a couple weeks, I overhauled the entire site
        over 2 days of near-constant work.
      </div>
    </div>
    <div class="flex-container4">
      <div class="flex-box4"></div>
    </div>
    <div class="flex-container5">
      <div class="flex-box5"></div>
    </div>
    <div class="flex-container6">
      <div class="flex-box6"></div>
    </div>
  </body>
</html>




my css:
body {
  padding: 25px;
  background-image: url(https://bot10exists.neocities.org/OIP2.jpg);
}

.greetings {
  color: #f8f8f8;
  background-color: #2f1c44;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  text-align: center;
  font-weight: bold;
}

.introduction {
  color: white;
  background-color: #2f1c44;
  font-family: "Times New Roman", Times, serif;
  text-align: center;
  font-weight: normal;
}

.normtxt {
  color: white;
}

.flex-container1 {
  display: flex;
  justify-content: left;
  align-items: left;
  height: 200px;
}

.flex-box1 {
  width: 250px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

.flex-container2 {
  display: flex;
  justify-content: center;
  align-items: left;
  height: 200px;
}

.flex-box2 {
  width: 400px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

.flex-container3 {
  display: flex;
  justify-content: right;
  align-items: left;
  height: 200px;
}

.flex-box3 {
  width: 250px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

.flex-container4 {
  display: flex;
  justify-content: left;
  align-items: left;
  height: 200px;
}

.flex-box4 {
  width: 250px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

.flex-container5 {
  display: flex;
  justify-content: center;
  align-items: left;
  height: 200px;
}

.flex-box5 {
  width: 400px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

.flex-container6 {
  display: flex;
  justify-content: right;
  align-items: left;
  height: 200px;
}

.flex-box6 {
  width: 250px;
  height: 250px;
  border: 2px dotted #000;
  background-color: #401f0f;
  padding: 15px;
  color: white;
  font-weight: normal;
}

ul {
  font-weight: lighter;
}
5 Comments
2024/12/20
05:25 UTC

1

Any notable changes to HTML/CSS in the past 6-7 years?

I haven't used much HTML/CSS in a serious way for the past 6-7 years, but used to hand code some websites back in the day. I've been mostly writing email templates more recently, which are very basic and mainly use inline CSS; no JavaScript, no forms, you know.

What are some relatively recent changes in HTML/CSS? Any notable trends or recommendations in past decade?

4 Comments
2024/12/20
03:54 UTC

2

If I am making responsive rows and columns of data, do I use table or grid?

See title.

5 Comments
2024/12/19
18:09 UTC

5

How do you structure your html code?

Hi! As a newbie who have experience of other programming languages such as python etc where you code break your code into regions and functions i find it a bit difficult to structure the code in html.. now a note here that I am a newbie in HTML/CSS and my knowledge is quite limited.

i usually like to use comments to create a custom region or a marker to add more readability and I have questions like can you create a region specially for headings to organize all headings, a section for images to place all the images related to a certain part their etc etc.

but the way I found that html works is it works line To line so if a image is first and a heading is later it will display the image first so If I first want to display a couple images first I put them, than display some headings below them , placed them! Now if I want to place some more images below the headings I would have to write the code below the heading tags.

is my thinking plain wrong? Than how do you structure your html code to make it more readable And write fairly clean code? You could always position them with CSS using margins etc I guess but that is a bigger pain(probably).

looking forward to any guidance thank you!

8 Comments
2024/12/19
13:45 UTC

10

When do you use <div> and when do you use <span>?

I understand that <div> is block and <span> is inline, but do you use them?

13 Comments
2024/12/19
05:28 UTC

2

Drop down navigation menu help

So, I am working on a personal project. But, I am hung up on a certain part which has been bugging me for weeks. I am making a Dragonball themed site which honestly has no real utility I just wanted to create my own power scale from db characters and one thing led to another and I ended up making other stuff. Anyway, the issue is with the navigation menu. My navigation has 3 main parts (the hamburger menu, drop down items, and labels). The issue is with the "labels". In a local environment, everything works fine, all key frames and animations excited in time and in order. But, in my domain, i run into issues. such as the drop down balls will close the labels inconsistently. (see below for example). I first thought perhaps it had to do with my css ids or my event handlers but if it all works in a local environment, why wouldn't it work I. a live one? If you want to see thing din action. and give me some pointers on other things here is the link (https://dragonballrankings.com/DragonBallRankings.html).

edit: I didn't know I couldn't post videos, so if you dm I can give you the comparison. If you visit the site you will see the issue but you won't see how it works in a local environment.

edit 2: it actually works fine in the reddit browser, you would have to open the link in chrome, safari, etc. so see the issue. Now that I think about it this may be a cache issue or perhaps the browsers are in some way be effecting the DOM timing or something. idk that's why I'm here.

edit 3: I can confirm it is s caching issue. After deleting my browsers cache history the issue (atleast that one) stopped. But, how do I prevent that? or is it a user end problem solve? Which seems... like something that won't increase engagement.

2 Comments
2024/12/18
19:40 UTC

2

How do I change an unordered list to use - instead of •?

Sorry this is probably a dumb question but I tried solutions from like 4 different websites and none of them worked.

My goal is to be able to have two unordered lists, one using a bullet and another using a dash. I would guess this means I would use a css tag in <style> but I have no idea what to write to make this happen. Thank you!

7 Comments
2024/12/18
18:40 UTC

1

Why does the CSS in my HTML email break when I send it? What do i need to do or to learn to fix it?

  • Context of the problem

I created a calculator form for the social security tax in my country. The client wants to send the calculation results via email in a table format. The email functionality works fine, but the CSS gets messed up. Margins and padding appear strange, and the final design doesn’t look good. I’ve already converted the CSS to inline styles using Mailchimp’s tool, but the issue persists. I’m not sure what else to try.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tables</title>
</head>
<body>
    <table style="margin: 0px;font-family: Arial, Helvetica, sans-serif;border-collapse: collapse;text-align: center;">
        <caption>INSS</caption>
        <thead>
        <tr>
            <th style="padding: 10px;border: 1px solid black;margin: 0px;background-color: #eae07f;">Base</th>
            <th style="padding: 10px;border: 1px solid black;margin: 0px;background-color: #eae07f;">Valores</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td style="padding: 10px;border: 1px solid black;margin: 0px;">INSS</td>
            <td style="padding: 10px;border: 1px solid black;margin: 0px;">{field_id="3"}</td>
        </tr>
        </tbody>
        <tfoot>
            <tr>
            </tr>
        </tfoot>
    </table>
</body>
</html>  

Here’s the code I wrote and converted to inline CSS using Mailchimp

This is the result I was aiming for.

This is the result I’m currently getting.

What do I need to do or learn to fix this?

0 Comments
2024/12/18
15:05 UTC

1

How do I go about my site not moving things when resizing window?

I am only just getting the hang of HTML and am aware my code is very messy, but for future pages I am trying to make it so if I resize the window, it just cuts off what doesn't fit (with scroll) rather than push everything inside my main div to the next "line".

This is the site im having the most trouble with : https://crumg.neocities.org/tabs/swollen-to-bursting

I think the issue is with the floats but I am lost on how to do it better

This site has the effect im looking for, but Im not good enough to understand whats going on in their code : https://sugarforbrains.neocities.org/home/

Im very sorry if this is a annoying beginner question !!

2 Comments
2024/12/18
15:04 UTC

2

I need help with Commets

I would like to make a Commentsection in my Website. Unfortunately I dont know how to do that. Can you help me or should I go to r/Javascript or an even higher Laguage? Thank you

6 Comments
2024/12/18
10:31 UTC

1

Is there a CSS selector like :has() that only checks top-level children?

I need to match an element where any of the top-level children match a selector. I've only come across :has(), but it matches any element in the entire child node tree. I only want to check the element's first level.

9 Comments
2024/12/18
00:14 UTC

2

how can i change the size of image in link like this...?

<img 
src
="https://i.pinimg.com/736x/0c/66/6a/0c666a5caeffde6a1fd22976824d0334.jpg" 
class
="card-img-top"
            
alt
="cat image">
3 Comments
2024/12/17
23:58 UTC

0

Form tags html/cass

Hi , just starting outbuilding websites , I have created a search bar with an enlarging animation that uses a form tag , I am now trying to create a contact Us form to fill out, Issue I am having Is using form tag to create the table is now having same animation as search bar , how do I stop this , any help greatly appreciated

1 Comment
2024/12/17
23:02 UTC

1

Need help with id and css, please.

I am confused on an assignment, my professor said

Your page needs to have a tag with an id.  Then

In css, you would use it like this #current-page{}

The criteria is as follows: Create hyperlinks between website pages.

• One ID is written and applied to the website navigation. 
• The ID is applied one time only on each page.
• The ID is used to identify the current page link in the top navigation of each page.

I thought my navigation links on each page were correct for this but I'm now confused since they aren't.

3 Comments
2024/12/17
19:06 UTC

2

Need help with aligning checkboxes

Hi, I’m a little new to this and I can’t figure out how to align my checkboxes with the words that are supposed to be associated with them. I’ve nested both the input element and the text I wrote for it inside a label element. It’s basically <label>Words<input/></label>. I tried to give the label element a for attribute with the same value as my input elements name attribute and then set the label to “vertical-align: center” (within input[type=“checkbox”]) and I tried “display:inline” (within input in css)but it’s not working

15 Comments
2024/12/17
18:19 UTC

0

Help noob

I am a beginner want to start frontend coding, and I have been learned at freeCodeCamp for basic html&css, now I should pass a test to end of this basic class. My doubt is this test provided an example profile pages, I need to coding an statics page like this, but I’m confused on the css variables and how to combine html elements, look at the example page that I have no ideas to how to do that, I can’t remember the css variables uses and how it works, adjust the page repeatedly makes me feel chaos and anxiety, do any guys have experiences that how to across this step, very thanks for somebody would tell me.

4 Comments
2024/12/17
15:31 UTC

23

Just for fun

0 Comments
2024/12/17
11:36 UTC

2

CSS not working alongside HTML on Github Pages. Need help.

Hey, like the title suggests. I have a repository on Github Pages where the HTML file is uploading perfectly fine but for some reason my CSS file isn't working. Here's a link to my repository and my line of code that links my css file to my html. Thank you.

https://github.com/hunterandtheaxe/hunterandtheaxe.github.io.git

<link rel="stylesheet" href="css/style.css">
1 Comment
2024/12/17
08:27 UTC

2

Slide show image sizing.

I'm doing a slide show but some of the images have different proportions to to each other. How can I make every image the same size?

2 Comments
2024/12/17
02:31 UTC

2

H2 and H3 next to each other/in the same line? several codes tried, no dice

Hi everyone. I’m a web designer that is currently moving a client’s site from Webflow to Kajabi due to her launching an online course program.

I’ve had great success in squeezing the relatively limited features out of Kajabi to build a beautiful site, but I have encountered an aggravating obstacle:

in the homepage’s header (hero section) I want to have a tagline in h2 (results in a 2-line header) and “with [company name]” directly following it in h3, no weird gaps between, spacing the same as a normal Paragraph sentence between them.

I know that headers, by nature, occupy a full line. I also know that code can do wonderful things. I want to keep them as h2 and h3 for consistency across devices but, for the life of me, I cannot find a code anywhere that will let me accomplish this. I could just adjust the style to specify exactly what size I want the fonts, but I’d rather not for a lot of reasons, and Kajabi doesn’t let you just highlight text and select a numeric font size at all 🙄

I’ve tried things across multiple coding/HTML/CSS forums, but nothing has worked. All help is appreciated.

Additionally: please don’t be an ass. Reddit has seemed to become such a nasty place to seek help.

5 Comments
2024/12/17
00:35 UTC

1

How create a private sphinx-build html webpage

Hi everyone, I have a technical question. I build a html webpage using sphinx for 2 jupyternotebooks I made. I now want to publish it, but it seems like all the free options such as github pages and readthedocs require payment for private repositories/webpages. Does anyone know a free way to host a private sphinx HTML webpage? I would like to protect my work for now to prevent it from being stolen by peers.

0 Comments
2024/12/16
21:10 UTC

1

HTML google maps custom marker

Hey guys!! i’ve been struggling for a week now. I can’t figure out how to get my embedded html Google Map (creating a new website)to include custom markers. I feel like I tried everything in my knowledge, but i’m def not a pro at this. Can someone help or tell me what’s wrong with the code? ^^^

<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Google Map with Custom Markers</title> <script src="https://maps.googleapis.com/maps/api/js?key=xxxxxxxxx" async defer></script> <style> /* Set map size */ #map { height: 100vh; width: 100%; } </style> </head> <body> <div id="map"></div> <script> function initMap() { // Center of the map const center = { lat: 39.8283, lng: -98.5795 }; // Centered on the USA // Custom Map Style (Replace with your JSON style) const mapStyle = [ { "elementType": "geometry", "stylers": [ { "color": "#f5f5f5" } ] }, { "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "elementType": "labels.text.fill", "stylers": [ { "color": "#616161" } ] }, { "elementType": "labels.text.stroke", "stylers": [ { "color": "#f5f5f5" } ] }, { "featureType": "administrative.country", "elementType": "geometry.fill", "stylers": [ { "color": "#862d2d" } ] }, { "featureType": "administrative.country", "elementType": "geometry.stroke", "stylers": [ { "color": "#852929" } ] }, { "featureType": "administrative.land_parcel", "elementType": "labels.text.fill", "stylers": [ { "color": "#bdbdbd" } ] }, { "featureType": "landscape.natural", "elementType": "geometry.fill", "stylers": [ { "color": "#6b0d0e" } ] }, { "featureType": "poi", "elementType": "geometry", "stylers": [ { "color": "#eeeeee" } ] }, { "featureType": "poi", "elementType": "labels.text.fill", "stylers": [ { "color": "#757575" } ] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [ { "color": "#e5e5e5" } ] }, { "featureType": "poi.park", "elementType": "labels.text.fill", "stylers": [ { "color": "#9e9e9e" } ] }, { "featureType": "road", "elementType": "geometry", "stylers": [ { "color": "#ffffff" } ] }, { "featureType": "road.arterial", "elementType": "labels.text.fill", "stylers": [ { "color": "#757575" } ] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [ { "color": "#dadada" } ] }, { "featureType": "road.highway", "elementType": "labels.text.fill", "stylers": [ { "color": "#616161" } ] }, { "featureType": "road.local", "elementType": "labels.text.fill", "stylers": [ { "color": "#9e9e9e" } ] }, { "featureType": "transit.line", "elementType": "geometry", "stylers": [ { "color": "#e5e5e5" } ] }, { "featureType": "transit.station", "elementType": "geometry", "stylers": [ { "color": "#eeeeee" } ] }, { "featureType": "water", "elementType": "geometry", "stylers": [ { "color": "#c9c9c9" } ] }, { "featureType": "water", "elementType": "geometry.fill", "stylers": [ { "color": "#a4a1a1" } ] }, { "featureType": "water", "elementType": "labels.text.fill", "stylers": [ { "color": "#9e9e9e" } ] } ] // Create the map const map = new google.maps.Map(document.getElementById("map"), { zoom: 4, center: center, styles: mapStyle, // Apply custom styling }); // Define the locations const locations = [ { lat: 40.93841886513192, lng:-74.31369967839944, title: "The Sports Factory" }, { lat: 40.01255281645222, lng: -82.99218696843147, title: "Historic Crew Stadium" }, { lat: 40.816146005917616, lng: -77.85739871210285, title: "Penn State University" }, { lat: 41.14089742879953, lng:-74.16357764858218, title: "Torne Valley Sports Bubble" }, { lat: 41.28108455301527, lng: -74.3012995803425, title: "Hudson Sports Complex" }, { lat: 440.65129020515308, lng: -75.56189720308907, title: "Twin Lakes Sports Field" }, { lat: 39.82867681885258, lng: -88.97141761682181, title: "Decatur Athletic Club" }, { lat: -37.78346816859892, lng: 175.29809009691095, title: "Hamilton Boys' High School" }, { lat: 41.94220792065716, lng: -87.94670000029029, title: "Bensenville Golf Dome" }, { lat: 43.23872466497498, lng: -70.89582237320803, title: "New England Sports Hub" }, { lat: 40.8609000565541, lng: -74.71344002213677, title: "Morris High School Dome" }, { lat: 42.342472081849586, lng: -71.51017698589368, title: "Wayside Athletic Club" }, { lat: 40.82872795668022, lng: -72.64972732213771, title: "Westhampton Beach Club" }, { lat: 42.39356482805164, lng: -82.97614060005287, title: "Chandler Park" }, { lat: 41.38921085639593, lng: -73.42410816446618, title: "Danbury Sports Dome" }, { lat: 40.77839602567255, lng: -73.94579980004274, title: "Yorkville Tennis Club" }, { lat: 41.11831582065076, lng: -73.71237676446617, title: "Armonk Indoor Sports Center" }, { lat: 35.972528577794854, lng: -114.83690440004825, title: "Boulder City Pool" }, { lat: 40.16988475903647, lng: -74.08000986256913, title: "Good Sports USA" }, { lat: 40.72762062125481, lng: -74.07322504153215, title: "Yanitelli Recreational Life Center" }, { lat: 37.9885079985943, lng: -100.85208684948908, title: "The Dome" }, { lat: 46.91608514543666, lng: -98.70198404419631, title: "University of Jamestown" }, { lat: 40.53652569989174, lng: -74.84770163600764, title: "Diamond Nation" }, { lat: 41.898791536532364, lng: -84.05922514833867, title: "Adrian College" }, { lat: 40.00337384590198, lng: -74.19737082252358, title: "Donovan Catholic Athletic Complex" }, { lat: 40.969536129948295, lng: -72.24571031967271, title: "Ross School Tennis Center" }, { lat: 39.99529300633881, lng: -74.16719606482486, title: "Bennett Indoor Athletic Complex" }, { lat: 41.010678586503275, lng: -73.6880623147104, title: "WATC Program" }, { lat:41.181204742715565, lng: -73.73884415772513, title: "Mount Kisco Country Club" }, { lat: 41.03897590019204, lng: -73.75586339330202, title: "Tennis Innovators Academy" }, { lat: 37.40620879792818, lng: -77.6554364288841, title: "Quest Swimming" }, { lat: 40.75898420469014, lng: -73.95974779939131, title: "Sutton East Tennis Club" }, { lat: 37.774942202823375, lng: -79.44382077796222, title: "Lexington Municipal Pool" }, { lat: 41.187466903727405, lng: -87.18069703563451, title: "The Connection Center" }, { lat: 41.24410277447869, lng: -75.83231068351111, title: "Wyoming Valley Sports Dome" }, { lat: 40.45553602299224, lng: -104.976030093302, title: "Highland Meadows Tennis Center" }, { lat: 33.335195913581195, lng: -111.95360833563035, title: "Arizona Cardinals Training Center" }, { lat: 43.09893118481785, lng: -75.26733869520292, title: "Utica College" }, { lat: 41.572150119099824, lng: -90.56794301305221, title: "Saint Ambrose Dome" }, { lat: 41.06106872068213, lng: -80.59956414242488, title: "Glacier Dome" }, { lat: 37.711871606423244, lng: -97.24555995036495, title: "Genesis Health Clubs" }, { lat: 35.928658446453944, lng: -94.9683932577682, title: "Northeastern State University" }, { lat: 43.111352877876975, lng: -75.59129875776819, title: "Sportsplex at Turning Stone" }, { lat: 43.0049237527107, lng: -78.8442559577627, title: "Brighton Park Golf Dome" }, { lat: 40.515647641913965, lng: -74.46551272893237, title: "Rutgers University Practice Dome" }, { lat: 40.71798966837334, lng: -73.59545771543985, title: "Hofstra Indoor Practice Facility" }, { lat: 42.405131604424966, lng: -82.91828487126071, title: "Court4 Tennis and Pickleball" }, { lat: 43.43825841823503, lng: -70.73310062893235, title: "Coastal Riptide" }, { lat: 45.54362737116833, lng: -73.45793684612649, title: "Centre Multi-Sports du College Francais" }, { lat: 46.39790349148744, lng: -63.8003390712607, title: "Credit Union Place" }, { lat: 42.81445670768512, lng: -71.63458460009653, title: "The Hampshire Dome" }, { lat: 40.75136777431438, lng: -74.36507240009654, title: "Florham park Sports Dome & Event Center" }, { lat: 41.72131512261311, lng: -88.28300200009653, title: "Sport Zone" }, { lat: 44.903845192004354, lng: -68.66833427126072, title: "University of Maine" }, { lat: 35.26725309813823, lng: -77.61803081358903, title: "Kinston Pool Dome" }, { lat: 39.08034797724177, lng: -76.92016747973764, title: "Fairland Sports & Acuatics Complex" }, { lat: 42.405131604424966, lng: -82.91828487126071, title: "South Lake Tahoe Pool Dome" }, { lat: 36.199315222802994, lng: -86.80450198661782, title: "Tennessee Titans" }, { lat: 35.98771499792442, lng: -113.82062367860672, title: "Grand Canyon West" }, { lat: 43.594343763382646, lng: -84.08526636906599, title: "Tri-city Sports Complex" }, { lat: 40.27430359708661, lng: -74.0829764543596, title: "Capelli Sports Complex" }, { lat: 40.471164310030034, lng: -104.87490682391616, title: "Future Legends Sports Dome" }, { lat: 40.48155500257983, lng: -74.66508050019306, title: "Iron Peak Sport Bubble" }, ]; // Custom marker icon const customIcon = { url: "https://i.postimg.cc/GmrvsXMj/Black-and-White-Bold-Baseball-Academy-Badge-Logo.png", // Replace with your icon URL scaledSize: new google.maps.Size(50,50), }; // Create an info window instance const infoWindow = new google.maps.InfoWindow(); // Add markers to the map locations.forEach((location) => { const marker = new google.maps.Marker({ position: location.position, map: map, title: location.title, icon: customIcon, }); // Add click event to open info window marker.addListener("click", () => { infoWindow.setContent(location.info); infoWindow.open(map, marker); }); // Close the previous info window when a new one is opened google.maps.event.addListener(map, "click", () => { infoWindow.close(); }); }); } // Initialize the map window.onload = initMap; </script></body> </html>
6 Comments
2024/12/16
17:04 UTC

Back To Top