Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-138105 | A vulnerability has been found in ssssssss-team magic-api 2.2.2. The affected element is an unknown function of the file /magic/web/datasource/jdbc/test of the component Datasource JDBC Test Endpoint. Such manipulation of the argument driverClassName leads to code injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not respoCVSS 6.9CVE-2026-138104 | A flaw has been found in ssssssss-team magic-api up to 2.2.2. Impacted is the function push of the file magic-api/src/main/java/org/ssssssss/magicapi/core/web/MagicWorkbenchController.java of the component Workbench Push Interface. This manipulation of the argument magic-push-target causes server-side request forgery. The attack can be initiated remotely. The exploit has been published and may be used. The project was informed of the problem early through anCVSS 6.9CVE-2026-138103 | A vulnerability was detected in ssssssss-team magic-api up to 2.2.2. This issue affects the function saveFile of the file MagicResourceController.java of the component magic-api-core resource save API. The manipulation results in code injection. It is possible to launch the attack remotely. The exploit is now public and may be used. The project was informed of the problem early through an issue report but has not responded yet.CVSS 9.4CVE-2026-138102 | A security vulnerability has been detected in D-Link DIR-620S 4.0.2. This vulnerability affects unknown code of the file /usr/sbin/anweb of the component Diagnostic Handler. The manipulation of the argument I leads to os command injection. It is possible to initiate the attack remotely. The exploit has been disclosed publicly and may be used.CVSS 5.3CVE-2026-138101 | A weakness has been identified in MassGen up to 0.1.97. This affects the function _generate_subagent_yaml_config of the file massgen/subagent/manager.py of the component Subagent Delegation System. Executing a manipulation can lead to improper authorization. The attack may be performed from remote. The exploit has been made available to the public and could be used for attacks. The project was informed of the problem early through an issue report but has notCVSS 6.9CVE-2026-138100 | A security flaw has been discovered in MassGen up to 0.1.97. Affected by this issue is the function __init__ of the file massgen/filesystem_manager/_filesystem_manager.py. Performing a manipulation results in protection mechanism failure. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. The project was informed of the problem early through an issue report but has not responded yet.CVSS 8.7CVE-2026-138099 | A vulnerability was identified in Tenda AC10U 1.18.6. Affected by this vulnerability is the function readUsb of the component ATE Service. Such manipulation leads to out-of-bounds write. The attack can be executed remotely. The exploit is publicly available and might be used.CVSS 6.9CVE-2026-138098 | A vulnerability was determined in weison-tech yii2-cms up to 1.0.2. Affected is an unknown function of the file protected/core/config/common.php of the component RBAC Authorization. This manipulation causes improper authorization. Remote exploitation of the attack is possible.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

CSS Grid vs Flexbox: Why It's the Wrong Question

Whenever I read posts online, I keep seeing the same question come up: should I learn Flexbox first or Grid first? Or sometimes, why should I learn Flexbox if…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 13 Min. Lesezeit
Quelle: dev.to
Rubrik: Programmation sécurisée

Whenever I read posts online, I keep seeing the same question come up: should I learn Flexbox first or Grid first? Or sometimes, why should I learn Flexbox if I already know Grid?



I completely understand where that question comes from. For a long time, I mainly used Flexbox for most of my CSS layouts. In my head, Grid felt like something you would only use for table-like designs or stiff-looking website structures. I thought Flexbox was the more practical choice for real projects, so I kept reaching for it again and again.



But I was wrong to ignore Grid for so long.



The more I worked on different layouts, the more I realised that only relying on Flexbox was actually limiting me. Some layouts felt harder than they needed to be, and I was spending extra time trying to force one tool to do everything. Once I started using Grid properly, it became much easier to see that Flexbox and Grid are not competing tools. They solve different layout problems, and they work even better when you use them together.



Flexbox is great for one-dimensional layout, while Grid shines in two-dimensional layout. Once you stop asking which one is better and start asking which problem you are solving, layout becomes much easier.



So in today’s blog, I want to go through the real difference between Flexbox and Grid, when each one makes more sense, and why learning both will give you much more control over your layouts.






The real difference between them



Before deciding which one to use, it helps to understand what each one is actually built for. A lot of the confusion around Flexbox and Grid comes from people treating them like they do the exact same job. They don’t.



Flexbox is a one-dimensional layout system. That means it works in one direction at a time, either in a row or in a column. It is really good when you want items to line up nicely, share space evenly, or stay aligned without needing to control the whole page structure.



Grid is a two-dimensional layout system. That means it lets you work with both rows and columns together. Instead of only thinking left to right or top to bottom, you can think about the full layout at once. This makes Grid much better for larger layout structures and for designs where placement matters.



Here is the simplest way I think about it:



Flexbox




  • One-dimensional

  • Best for laying items out in a row or a column

  • Great for alignment and distributing space



Grid




  • Two-dimensional

  • Best for controlling rows and columns together

  • Great for page sections and structured layouts



If I had to explain it in one sentence, I would say this: Flexbox helps you arrange items inside a space, while Grid helps you define the space itself.



That is why Flexbox feels so natural for things like navigation links, buttons, card content, or small groups of elements. You usually just want things to sit beside each other, wrap when needed, and stay nicely aligned. Flexbox handles that really well.



Grid feels better when you already know the structure you want. Maybe you want a sidebar on the left, a header across the top, and a main content area that takes up the rest of the page. Or maybe you want a gallery of cards that fits into clear columns and rows. That is where Grid starts to shine, because it gives you much more control over the overall layout.



A big mistake people make is thinking one of these tools is more modern, more powerful, or a replacement for the other. But really, they are just solving different layout problems. Flexbox is not a lesser version of Grid, and Grid is not just Flexbox with more features. They each have their own strengths.



Once you understand that difference, things start to click much faster. Instead of asking which one is better, you can ask a much more useful question: am I arranging items in one direction, or am I building a layout that needs rows and columns working together?



That question usually points you to the right answer.






Why learning only one causes problems



Once you understand the difference between Flexbox and Grid, the next thing to realise is that only learning one of them can make your layouts harder than they need to be.



You can still build a lot with just one tool, and that is usually why people delay learning the other one. At first, it feels fine. You find a way to make the layout work, the page looks correct, and you move on. But over time, you start noticing that some layouts feel awkward to build, harder to maintain, or more complicated than they should be.



That is usually the point where one tool is being pushed beyond what it is best at.






If you only learn Flexbox



If Flexbox is the only layout tool you are comfortable with, you will probably start using it for everything. I did the same myself. The problem is that while Flexbox is excellent for rows, columns, alignment, and spacing, it can become frustrating when the layout needs more structure.



You may end up forcing complex page layouts into nested rows and columns, adding wrapper after wrapper just to get things into the right place. It works, but it can feel like you are constantly adjusting margins, widths, and alignment rules just to keep everything under control.



This usually leads to a few common problems:




  • You force complex page layouts into rows and nested wrappers

  • You end up fighting spacing and alignment

  • Two-dimensional layouts become harder than they need to be



In other words, Flexbox can handle a lot, but that does not mean it is always the best tool for the job. If the layout depends on both rows and columns working together, Grid will usually get you there faster and with less frustration.






If you only learn Grid



The opposite can happen too. If you mainly learn Grid and try to use it for everything, small interface elements can start to feel more complicated than they need to be.



Grid is great when you want structure and precise placement, but not every part of a layout needs that level of control. Sometimes you just want a few items to sit in a row, space themselves out nicely, or stay centered vertically. That is exactly the kind of job Flexbox is very good at.



If you only rely on Grid, you may notice these issues:



-You may overcomplicate simple UI components




  • Small alignment tasks can feel awkward

  • You miss how efficient Flexbox is for buttons, navbars, and card content



So while Grid is powerful, it is not always the quickest or cleanest option for smaller one-direction layouts.






The real issue



Neither tool becomes a problem on its own. The problem starts when you expect one of them to solve every layout task you come across.



That is when CSS starts feeling more difficult than it really is. You are not always struggling because the layout is advanced. Sometimes you are struggling because you are using the wrong layout tool for that specific job.



Learning both gives you more freedom. It means you can stop forcing a solution and start choosing one that fits naturally. And once you get used to that mindset, building layouts becomes much more straightforward.



Next, let’s look at the situations where Flexbox is usually the better choice.






When Flexbox is the better choice



Flexbox is usually the better choice when your layout only needs to move in one direction. That could be a row or a column. If your main goal is to line items up, control spacing, or align content neatly inside a container, Flexbox is often the simplest option.



This is why it shows up so often in everyday interface design. A lot of UI elements are not full page layouts, they are smaller groups of content that just need to sit nicely beside each other or stack cleanly.



Some common examples are:




  • Navigation bars

  • Button groups

  • Centering content

  • Form controls in a row

  • Card internals

  • Toolbars

  • Tag or chip lists



What makes Flexbox so useful here is that it works well with the natural flow of content. Items can grow, shrink, wrap, and space themselves out without you needing to define a strict structure for every part of the layout.



For example, if you have a row of buttons and one has a longer label than the others, Flexbox handles that naturally. If your navigation links need to spread across the available space, Flexbox makes that easy. If you want to center something both vertically and horizontally, Flexbox is often one of the first tools people reach for because it does that job really well.



Flexbox is especially useful when:




  • You care about content flow

  • Items should adapt naturally

  • Alignment and spacing matter more than rigid placement



That is really the key idea. Flexbox is not about placing everything into a fixed structure. It is about letting content behave more naturally inside the space it has been given.



Here is a simple example:




.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}






With just a few lines, you can place items in a row, push them apart, and line them up vertically. That is part of why Flexbox feels so nice to work with for smaller layout tasks. You can often get the result you want without writing much code.



So if the layout feels like it should grow, shrink, wrap, or align naturally, Flexbox is usually the better choice. It shines when the content itself should help decide how the layout behaves, rather than being locked into strict row and column positions.



Next, we will look at when Grid becomes the better tool.






When Grid is the better choice



Grid is the better choice when your layout needs structure. While Flexbox works well when content flows in one direction, Grid works best when you want to control both rows and columns at the same time.



This is where Grid starts to feel much more powerful. Instead of thinking about one line of items at a time, you can think about the whole layout in one go. You can decide how many columns you want, how rows should behave, and where each section should sit.



That makes Grid especially useful for layouts like:




  • Page-level layout

  • Dashboard layouts

  • Card galleries

  • Pricing tables

  • Magazine or article layouts

  • Any layout with clear rows and columns



For example, if you are building a page with a sidebar, a header, a main content area, and maybe a footer, Grid is usually the cleaner option. You can define the page structure first, then place each section where it belongs. The same goes for card galleries, where you want items to sit in neat columns and wrap into new rows automatically.



Grid is best when:




  • You want explicit structure

  • You need rows and columns working together

  • Placement matters more than natural content flow



That last point is usually what tells you Grid is the right tool. If you already know where things should go on the page, Grid gives you a much clearer way to build that layout.



Here is a simple example:




.layout {
display: grid;
grid-template-columns: 250px 1fr;
grid-template-rows: auto 1fr;
gap: 1rem;
}






With this, you are not just lining items up in one direction. You are defining a layout system. One column can hold a sidebar, the other can hold the main content, and your rows can separate the header from the rest of the page.



That is why Grid feels so good for bigger layout decisions. You are creating the structure first, rather than trying to shape content into place afterwards.



So if the layout has clear sections, depends on rows and columns, or needs more intentional placement, Grid is usually the better choice. It gives you more control without needing lots of extra wrappers or layout tricks.



Next, we can move on to the section that ties everything together: real projects use both.






Real projects use both



In real projects, I do not usually sit down and say I am only going to use Flexbox or I am only going to use Grid. I try to use the best tool for the situation. That said, sometimes I also use what feels most comfortable if the layout is simple and I know it will not cause problems later.



I think that is a more realistic way to look at it.



A lot of the time, the “best” choice is not about following a strict rule. It is about understanding what the layout needs, what will keep the code cleaner, and what will make the most sense when you come back to it later. Sometimes both Flexbox and Grid could work, but one of them will usually feel more natural once you look at the structure.



That is also why real projects often use both together. One tool handles the bigger layout, while the other handles the smaller pieces inside it.



Here are a few examples of how I approach projects.



Kanji App



For my Kanji learning app, I had a list of kanji to list out and with the flow of the list, it made sense to use flexbox as it allows me to wrap the list once a row is full, as each time the list increases and decreases.



Colour picker



For my colour selection project I mainly used, as I had a set style I wanted that got complex and I needed to format my data to fit into each section that lined up in a clean style.



games project



In my game database project, I used Grid for the layout and Flexbox for the list in each section. This was the first project that I started to use both together and understand the pros and cons of each.



It always comes down to what works best for your situation, and you don't have to follow strict guidelines.



Next is: where do I go to learn about Grid or Flexbox?






Where to learn



So what are the ways you can learn about Grids or Flexbox?



First, there are the MDN docs where you will get a deep explanation of each:





Second, if you want more of a quick explanation with more visuals, CSS Tricks has a great guide for both:





Third, maybe you want to play a game while learning each; there are two games: Grid Garden and Flexbox Froggy.





Finally, if you just want to watch a video on the go, Coding2Go has two great videos on the topics:








Conclusion



Flexbox and Grid are not competing tools, they just solve different problems. The more you understand what each one does well, the easier it becomes to choose the right one for the layout in front of you.



In real projects, you will often end up using both. And once you stop thinking of it as Flexbox versus Grid, CSS layout starts to make a lot more sense.

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Discussion communautaire et commentaires

🌐 Rejoindre le chat principal

Lancez la discussion dans le flux diffusé du Social Chat ou proposez ci-dessus une contribution experte via le formulaire de complément.

Évaluation communautaire & preuve sociale
⭐ Avis des lecteurs
–
Ø / 5.0
Pas encore d'évaluation des lecteurs
Cet article vous a-t-il été utile ?
0
Donner votre évaluation
Évaluation détaillée (facultatif)
Contenu & qualité
Source & fiabilité
Actualité
Briefing sécurité Gratuit · désabonnement en 1 clic

Intelligence Digest — gratuit

Chaque jour, les principales actualités sécurité · résiliable à tout moment

Groupes d’histoires apparentées & sources (IA vectorielle)

6 Cluster
25 sources
ForgeOS Booted on a Real Server: Linux Kernel Below, Only Our Own Code Above
DEV Community il y a 1 h
24 autres sources
VulDB Updatesil y a 2 hCVE-2026-72239 | Linux Kernel sev x86/virt/sev/sev.c wbinvd_on_all_cpus state issue (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72240 | Linux Kernel up to 7.1.4 mfd sm501_register_device memory leak (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72241 | Linux Kernel up to 7.1.4 uleds strchr buffer overflow (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72244 | Linux Kernel up to 6.12.100/6.18.41/7.1.4/7.2-rc2 gpu-buddy allocation of resources (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72243 | Linux Kernel up to 7.2-rc2 selinux socket_sendmsg permission (Nessus ID 364200 / WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72245 | Linux Kernel up to 7.1.4 host1x host1x_device_parse_dt release of resource (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72246 | Linux Kernel flowtable input validation (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72247 | Linux Kernel up to 7.2-rc3 nf_conncount __nf_conncount_add dir comparison (WID-SEC-2026-2852) VulDB Updatesil y a 2 hCVE-2026-72248 | Linux Kernel up to 7.1.4/7.2-rc2 flowtable nft_flow_dst_release buffer overflow (WID-SEC-2026-2852) LinuxAndUbuntuil y a 2 hLinux AutoFDO Benchmark: Clang Kernel Optimization FOSS Linuxil y a 2 hNFS2ROOT: Pre-Auth Flaw in the Linux NFS Server VulDB Updatesil y a 3 hCVE-2022-31607 | NVIDIA GPU Display Driver on Linux Kernel Mode Layer nvidia.ko input validation (EUVD-2022-53059 / Nessus ID 339047) VulDB Updatesil y a 4 hCVE-2026-72227 | Linux Kernel up to 6.12.96/6.18.39/7.1.4/7.2-rc2 batman-adv out-of-bounds (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72228 | Linux Kernel up to 7.2-rc2 batman-adv skb_split memory leak (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72229 | Linux Kernel up to 7.2-rc2 batman-adv register_netdevice memory leak (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72231 | Linux Kernel up to 7.2-rc2 batman-adv batadv_send_tt_request allocation of resources (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72230 | Linux Kernel up to 7.2-rc2 batman-adv batadv_frag_send_packet memory leak (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72232 | Linux Kernel up to 7.2-rc2 batman-adv batadv_interface_tx out-of-bounds (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72234 | Linux Kernel up to 7.2-rc1 batman-adv batadv_get_vid use after free (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72233 | Linux Kernel up to 7.2-rc1 batman-adv batadv_bla_is_backbone_gw use after free (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72236 | Linux Kernel up to 7.2-rc3 s390/perf_cpum_cf __hw_perf_event_init config array index (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72235 | Linux Kernel up to 7.2-rc1 batman-adv batadv_interface_rx use after free (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72237 | Linux Kernel up to 7.2-rc2 BRS /x86/amd/brs amd_brs_match_plm information disclosure (WID-SEC-2026-2852) VulDB Updatesil y a 4 hCVE-2026-72238 | Linux Kernel up to 7.2-rc3 x86 boot early_serial_init integer overflow (WID-SEC-2026-2852)
14 sources
Cyber Monday Australia laptop deals for 2026: score up to 52% off Lenovo, Apple, Dell, HP and more
Latest from TechRadar il y a 27 min.
13 autres sources
Articles similaires
🔍 Verwandte News

Auch interessante Nachrichten CSS Grid vs Flexbox: Why It's the Wrong Question

Thematisch verwandte Begriffe: Grid, Flexbox, Wrong, Question · 6 Treffer

Laden...

Chargement des vidéos ...

Laden...

Chargement des articles ...

Laden...

Chargement des vidéos ...

Laden...

Chargement des articles ...

Laden...

Chargement des vidéos ...

Laden...

Chargement des articles ...

Laden...

Chargement des vidéos ...

Laden...

Chargement des articles ...

Laden...

Chargement des vidéos ...

💬 Chargement des commentaires…
Sentinel CTI: ONLINE
Tirer pour actualiser
Widgets & sujets
Chargement des widgets…
Article suivant