Hey everyone, I'm new to web development and could really use some assistance. I am currently working on a website that shows the weather forecast for the next four days, using SimpleWeather.js. In my JavaScript, I want to display the High & Low temperatures for each day with a "|" between them. I also want to style this divider with a custom color by adding a class. However, when I try to do this, it adds unnecessary line breaks and I can't figure out why.
Here is the code snippet:
$("#high-low-one").html(weather.forecasts.one.high+'<p class="high-low-divider">|</p>'+weather.forecasts.one.low);
But the output looks like this:
30
|
28 (where 30 represents the high temperature and 28 represents the low temperature for a specific day.)
I have tried various CSS solutions like inline-text, inline-block, block, and nowrap but nothing seems to work. Any suggestions would be highly appreciated!