Developing an interactive web interface with HTML

I've been attempting to design a flexible HTML page that replicates the layout of a Java applet clock, but I'm unsure if my current approach is correct.

Below is an example of the three-clock image set that I am currently working on. My method involves using div, margins, and padding in CSS to structure the clocks. However, due to varying font sizes within each line, I've resorted to using vmin font size to achieve auto-resizing, albeit with mixed results. I've scoured the internet for tutorials or examples that address this specific issue, only to come up empty-handed. The existing examples either resize paragraphs with uniform font sizes throughout, or incorporate images instead.

If anyone knows of a tutorial or example that tackles this problem, please share. Perhaps I should consider utilizing canvas or some alternative to div tags for this task.

https://i.stack.imgur.com/D7hyT.png

This snippet below represents my single clock page before adding the CSS elements:

<html>
  <head>
    <meta charset="utf-8"/>
    <meta name="description" content="AOS/LOS Clock" />
    <title>AOS/LOS Clock</title>
    <link rel="stylesheet" type="text/css" href="css/mc_style.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type=\"text/javascript\" src=\"js/mc_clocks.js?color=00ff00&file=input/aos_times_json;\"></script>
    <script type="text/javascript" src="js/mc_engine.js"></script>
  </head>

  <body id="body">
    <div id="wrapper">
      <div id="clockAOS" class="clock missionColor"></div>
      <div class="title missionColor"><span>Acquisition of Signal</span></div>
      <div id="relay" class="siteTdrs"></div>
      <div id="clockLOS" class="clock missionColor"></div>
      <div class="title missionColor"><span>Loss of Signal</span></div>
    </div>
    <p id="Msgs"></p>
  </body>
</html>

Answer №1

If you're looking to lay out elements on a webpage, I highly recommend checking out bootstrap. This framework makes creating responsive layouts easy and efficient.

When it comes to font sizing, achieving consistent results across all browsers and devices can be challenging. Even using pixels as a measurement unit may vary on different screen types. For more insights on font sizing, check out this article.

Answer №2

After revisiting the vs font descriptions and making adjustments to my css sheet, I was able to resize the fonts successfully. However, I noticed that the negative margin-left doesn't appear consistent between the linux box and PC even though I am using the same terminal screen. Despite this inconsistency, the overall result is an improvement from before.

<!DOCTYPE html>
<html>
<style>

body {
    font-family: helvetica, arial, sans-serif;
    font-weight: bold;
    color: #fff;
    background: #000;
    margin: 2vw 10vw 2vw 10vw;
}

span {
    white-space: nowrap;    /* Specify that the text in element will never wrap */
}

.header {
    font-size: 4vw;
    font-weight: bold;  /* bold font */
    color: lightGray;   // color for tdrs/site
}
.header-split      { 
    display:block;
    margin-left:15vw;
}
.header-split span {
    display:block;
    float:right;
    width:30%;
}
#header-ul {
    border-bottom: 3px solid lightgrey
}

#rm {
    text-align: center;
    margin-left:-10vw;
}
.siteTdrs {
    font-size: 3vw;
    font-weight: bold;  /* bold font */
    color: lightGray;   // color for tdrs/site
}
.mission {
    font-size: 4vw;
}

.clock {
    font-size: 8vw;
    text-align: center;
}

.terraColor {
    color: #00ff00; // GREEN
}
.aquaColor {
    color: #00ffff; // CYAN
}
.auraColor {
    color: #ffc800; // ORANGE
}

</style>

<body>
    <div id="wrapper">
      <div id="header-ul"><div class="header header-split">AOS<span>LOS</span></div></div>

      <div id="rm" ><span id="terraRelay" class="siteTdrs">TDE</span>&nbsp;&nbsp;<span class="mission terraColor">TERRA</span></div>
      <div id="terraTime" class="clock terraColor"><span>00:00:00&nbsp;&nbsp;00:00:00</span></div>

      <div id="rm" ><span id="aquaaRelay" class="siteTdrs">SG1</span>&nbsp;&nbsp;<span class="mission aquaColor">AQUA</span></div>
      <div id="aquaTime" class="clock aquaColor"><span>00:00:00&nbsp;&nbsp;00:00:00</span></div>

      <div id="rm" ><span id="auraRelay" class="siteTdrs">TDW</span>&nbsp;&nbsp;<span class="mission auraColor">AURA</span></div>
      <div id="auraTime" class="clock auraColor"><span>00:00:00&nbsp;&nbsp;00:00:00</span></div>
    </div>
    <p id="Msgs">this is a error</p>
</body>

</html>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The simplest method for integrating SASS within your WordPress website

While I usually work with CSS, I've decided to tackle SASS in order to improve my efficiency. I successfully converted a CSS file from .css to .scss and it still works as expected. However, when I added variables, they didn't function properly. ...

Balanced Columns with Background Extending Beyond Half of the Page

If you're looking for the final code, it can be found here: http://jsfiddle.net/asaxdq6p/6/ I am attempting to create an effect similar to this image: To achieve this, I am using the Equal Height Columns with Cross-Browser CSS trick as described in ...

The transparency of the text in my navbar is glitching when I scroll down

I'm experiencing an issue with my navbar text becoming translucent when scrolling. How can I fix this problem? Check out the picture below for more details. ...

Pressing JavaScript buttons to trigger another button

I am looking to develop a script that generates a button which then creates another button. The subsequent button will be assigned an id attribute by incrementing from 1 to infinity. This feature should apply to all buttons (original button and the newly ...

Instant access to an interactive online platform

Is it feasible to create a shortcut from a webpage to my desktop for quick access? For instance, if a dynamic web page has 15 documents and I want to easily create shortcuts to them on my desktop by clicking on each one. I understand this is a brief quest ...

Problem with creating child view in Laravel's `view:make` command

Forgive me if this is basic. I am still learning Laravel and my layout skills are not the strongest. Here's where I'm at: I have a main layout in app.blade.php that is working fine. I then extracted the content from the welcome page and placed it ...

Is it possible to include a div above a centered image?

Currently I am working with ImageFlow and I would like to overlay a div on top of the image when it is clicked, sliding it into the center. I have been looking through the JavaScript file but the function MoveIT() seems to be called multiple times and I am ...

Use jQuery.ajax() to submit data in separate rows of a table

At the moment, I have no issues submitting my form as long as it contains only one row in the table. However, when I add a second row, an error occurs and the submission fails. My goal is to be able to post the data from each table row separately with just ...

Tips for creating a customized dropdown menu that opens upwards without relying on Bootstrap

Looking for some assistance with creating an animated dropdown menu that slides upwards. Any help is appreciated! $('.need-help').click(function() { $('.need_help_dropdown').slideToggle(); }); .need-help { background:url(../im ...

Container filled with a table element

My challenge involves a container grid with 3 div flex subelements. The first is the fixed header, the second is the body, and the third is the fixed footer. Within the body, there is a table. What I want to achieve is that when I resize the window, the ta ...

CSS: Struggling with Div Alignment

Here is a visual representation of the issue I am facing: View the screenshot of the rendered page here: http://cl.ly/image/0E2N1W1m420V/Image%202012-07-22%20at%203.25.44%20PM.png The first problem I have encountered is the excessive empty space between ...

"Items within mui Grid do not properly align within the Grid container

I'm struggling to fit two large Grid items inside a Grid container. The Grid container needs to be 100% of the screen's height (or parent container) Grid items are large and need to fill the container while remaining scrollable Image #1 shows t ...

What is the process for setting up a vertical carousel in Bootstrap 5 with a stationary previous image?

Looking for assistance with my vertical carousel project. Is there a way to create a vertical carousel in bootstrap 5 with the previous image fixed? I found a slider on this website: zara.com/jp/en/ I want to maintain the previous image in a fixed posit ...

Incorrect placement of rectangle on a dynamic canvas

After clicking on two different positions on the canvas rectangle, I noticed that it was being drawn in the wrong location due to issues with the responsive canvas size. Despite attempting to scale the pointer position based on both the canvas and window w ...

Adjusting the input label to be aligned inside the input box and positioned to the right side

I am currently working on aligning my input label inside the input box and positioning it to float right. The input boxes I am using have been extended from b4. Currently, this is how it appears (see arrow for desired alignment): https://i.stack.imgur.co ...

Add up the values in the table by organizing them into groups

There is a table below that I am working with: <table> <tr> <th>Category</th> <th>Value</th> </tr> <tr> <td class="cat1">cat1</td> <td class="value" ...

The CSS styling of Confluence content is stripped when exporting to Word

Greetings StackOverflow community, I have embarked on creating a document generator within Confluence 6.10.2 (utilizing JQuery 1.7.2) that offers a range of options for the user. Users are able to interact with checkboxes or radio buttons that trigger th ...

Automatic line breaks in MathJax when displayed in a modal dialogue box

As part of a math project, I need to display the solution of a problem in a Sweetalert2 modal. However, despite using the following code: <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$ ...

Exploring ng-view navigation in AngularJS

I have come across an SEO issue while working on a static website in AngularJS. Google Webmasters Tools report no crawl errors, but when I attempt to fetch different routes, it consistently returns the same home page result. It seems to be ignoring what ...

Deciphering HTML utilizing XSLT

Looking for assistance in extracting data from the following RSS feed: <rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"> <channel> <title>This is a test</title> <link>http://somelink.html</link> ...