Adaptable and personalized Timeline

I created a timeline but unfortunately, I am facing some challenges that I cannot seem to resolve :(

Firstly, the timeline is not adapting to different screen sizes, causing the lines to separate when the screen is enlarged or when longer descriptions are used. I would like it to always stay together. Does anyone have a solution for this issue?

Secondly, the timeline currently starts at value 1 but I need it to always start at value 4. How can I change this?

As shown in the image, both problems are visible - the separate timeline lines and starting at 1 instead of 4.

HTML

<ul class="timeline" id="timeline" *ngFor="let priority of Priorities; let  p = index;">
    <li class="li complete">
        <div class="timestamp">
            <span class="priorityNumber">{{priority.id}}</span>
        </div>
        <div class="status">    
                <span class="circle"></span>
            <h4 class="timelineh4">{{priority.text}}</h4>
        </div>
    </li>
</ul>

Answer №1

After reviewing your code, I noticed that you are using Angular but implementing it in a more traditional JavaScript way. I have made some fixes and improvements in this updated version. However, I need more clarification on what you're asking in your second question. Can you provide more details?

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

Hello, I am attempting to switch tabs based on the selected value using AngularJS

Here is the code snippet I am working with: function showFields(){ vm.activetab = ''; if(vm.selectpage.name=='dashboard'){ vm.activetab.main = true; }else if(vm.selectpage.url == 'calender'){ vm.activetab.cal ...

Converting an array of objects to an array based on an interface

I'm currently facing an issue with assigning an array of objects to an interface-based array. Here is the current implementation in my item.ts interface: export interface IItem { id: number, text: string, members: any } In the item.component.ts ...

Transforming the input result based on selection using jQuery

Currently, I have a selection where choosing "He" results in the outcome being "Boy". However, when I switch the choice to "She", the outcome remains "Boy". Is there a way for the outcome to change based on the selected choice? <select id="choice"> ...

Exploring the integration of mixins from .scss files within node_modules into our .tsx or .jsx files for enhanced styling

I am currently facing a challenge with importing a .scss file from one of the installed node_modules into my .tsx file. The scss file contains a mixin named @mixin make-embedded-control($className: embedded-control){.....} which has all the necessary css ...

Assigning the variable "name" attribute to an <input> element in HTML: A step-by-step guide

In the image below, I am working on creating a user interface using JSP and loops. I am looking to assign unique names to each input element to differentiate them. To achieve this, I plan to give them variable name attributes which I can set and populate ...

The type '(props: Props) => Element' cannot be assigned to the type 'FunctionComponent<FieldRenderProps<any, HTMLElement>>' in React-final-form

I'm fairly new to using TypeScript, and I am currently working on developing a signUp form with the help of React-Final-Form along with TypeScript. Here is the code snippet that describes my form: import React from "react"; import Button from "@mater ...

Changing text color with JQuery animation

Is there a way to animate text color using jQuery/jQuery UI? I want the text color to change from #000 to #F00 when an event is triggered, then fade back to #000 over 3 seconds. I attempted using effect("highlight", {}, 3000) with the highlight effect, bu ...

Developing bespoke styles in Angular Material 2

I am in the process of developing a unique theme for my Angular 2 application, incorporating various components from angular material 2. Despite searching extensively online, I haven't been able to find much relevant information. The only documentati ...

Transforming the header to function similarly to the address bar in the Google Chrome mobile app

I have managed to create a fixed header that appears when the user scrolls up and disappears when they scroll down. However, I want it to behave like the address bar on the Google Chrome mobile app - remaining stationary until the top of the window reaches ...

Storing a Business Hierarchy in Browser Storage with JavaScript

I have developed a hierarchical tree structure on an HTML page where users can customize a company's organizational chart based on their needs. However, I am looking to store this structured data in local storage so that it can be utilized on another ...

What is the best way to dynamically translate TypeScript components using transloco when the language is switched?

I am seeking clarification on how to utilize the TranslocoService in TypeScript. Imagine I have two lang JSON files for Spanish and Portuguese named es.json and pt.json. Now, suppose I have a component that displays different labels as shown in the followi ...

Can the nested package within the package-lock.json file be updated?

Take for instance the make-fetch-happen package within npm/node-gyp/node_modules/ directory. https://i.sstatic.net/Marw5.png I am looking to update the make-fetch-happen package due to the http-cache-semantics v4.1.0 version being marked as unsafe in thi ...

Maintaining accurate type-hinting with Typescript's external modules

Before I ask my question, I want to mention that I am utilizing Intellij IDEA. In reference to this inquiry: How do you prevent naming conflicts when external typescript modules do not have a module name? Imagine I have two Rectangle classes in different ...

Tips for deleting "Category: [category name]" in Wordpress

I have attempted various solutions found in previous threads, but none of them seem to work for me. Here is a screenshot I am looking to remove the text from the header in the category and only display [category name]. Can anyone assist me with this, ple ...

Is it possible to change cases within a switch statement after one case condition has been satisfied?

I am currently working on implementing a game that involves rolling dice in Javascript/jQuery. The game has different "Phases" that the player must complete one by one without any interference from previous phases. The goal is to smoothly transition betw ...

Is there a way to automatically redirect the main html page to a different html page upon logging in?

I have created a main page in HTML with a login box that displays a message saying "Login successful" or "Login failed" based on whether the password entered is 8 characters or more. The validation function for this works correctly, but after successfully ...

What is the best way to align list items both to the right and left in my navigation

How can I justify list items both right and left in my navigation bar? <nav class="navbar navbar-expand-lg navbar-light bg-light"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" ...

Hide image URL on mobile devices with CSS and JavaScript

Exploring the realm of cross-device magic, I have a challenge on my hands. My goal is to eliminate a slider image for screen widths smaller than 622px. Through experimentation, I have discovered that removing the image URL in CSS achieves the desired effec ...

What could be causing the uneven application of CSS padding when it is applied to a div that serves as the parent of an HTML form?

Padding has been added only to the top and bottom of a div. The padding attribute is displaying consistently for the form element, however, it is not behaving uniformly for the parent div of the form as illustrated in the image provided below. Output:- h ...

Triggering a system context menu through a longpress gesture on the MobileFirst iOS app is a

After experimenting with our MobileFirst iOS app, I noticed that if you hold down on any anchor links for more than 2 or 3 seconds, iOS will bring up a built-in menu displaying the internal path of the current HTML page. I'm unsure whether this behav ...