FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Moving elements with JavaScript
NewsWeb Development

Moving elements with JavaScript

via Dev.to JavaScriptNic11h ago

Recently I had a situation where there were two elements, A and B, each of which contained a whole load of things. On mobile A was at the top and B was below it. But on desktop B was on the left and A was on the right. Theoretically that's easy to fix - flexbox will sort that right out. However, that then meant that the focus order was wrong. But that's still an easy fix - you just duplicate one of the elements in the HTML and hide one on mobile and the other on desktop. Except that this is in a CMS and the HTML was being built by it and didn't exist as HTML to change. And there were a load of scripts doing things inside these elements, some of which could well depend on a unique ID or a class only being used once. It was an important page on the site, so if I broke it, things would go very wrong, so I didn't want to touch it. There will one day be some CSS to tackle this: reading-flow . But at the moment it's only available in Chromium browsers and is also marked as experimental, ther

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
1 views

Related Articles

Paramount+ and HBO Max to merge into one streaming service after WBD deal closes
News

Paramount+ and HBO Max to merge into one streaming service after WBD deal closes

TechCrunch • 10h ago

Transactions in Spring: What Really Happens (And Why Most Developers Only Understand 30%)
News

Transactions in Spring: What Really Happens (And Why Most Developers Only Understand 30%)

Medium Programming • 10h ago

News

Why APY Is the Most Misunderstood Metric in DeFi

Medium Programming • 10h ago

News

Jebaya Software Title: Jebaya Software for Collectors and Companies Article: FiberBills is a…

Medium Programming • 10h ago

Our Favorite Budget TV Is On Sale
News

Our Favorite Budget TV Is On Sale

Wired • 10h ago

Discover More Articles