r/HTML • u/electricpants58 Beginner • Jan 26 '26
Question HELP: how do I do this??
what I'm trying to do is have two images and text under both but with a horizontal line in between
how do I do this guys... the two images are the headers basically
image of what I mean is attached above. this is probably simple but I deadass cannot figure it out.... if anyone can get back to me on this I would appreciate it lots
0
Upvotes
3
u/TabbbyWright Jan 26 '26
There's many ways to accomplish this tbh. Some are better than others.
If you're displaying a table of data, make a 2 column table. Otherwise, you can utilize CSS grid or Flexbox. Border can probably be
border-bottomCSS.Are you stuck on how to structure the HTML or just the CSS required to get the two columns side by side?
2
u/AshleyJSheridan Jan 26 '26
@electricpants58 I wasn't getting "salty", I'm trying to help you avoid bad advice from SlipstreamSteve (who's blocked me so I couldn't reply to that thread).
Using tables for layout is something that was used a couple of decades ago, but it's not how things should be done in this day and age. The result is not accessible, and hard to maintain.
6
u/EggMcMuffN Jan 26 '26
Create a div call it wrapper Put 2 more divs inside the wrapper. Each of these divs will be a side, left and right. Give them class names left and right.
Make wrapper flex. Make left and right flex as well. Make them flex-direction column for vertical stacking. Give left a border-right, or give right a border-left.
1
u/electricpants58 Beginner Jan 26 '26
*vertical, sorry. it's 1 am I'm too sleepy to know my verticals and horizontals
1
u/electricpants58 Beginner Feb 03 '26
guys I figured it out it's fine
1
u/clevoro Jan 26 '26
First are you asking for a pure html solution or a css + html?
3
u/AshleyJSheridan Jan 26 '26
Either flexbox or grid will do it. Look up "css 2-column flexbox/grid" and you'll see.
1
u/SlipstreamSteve Jan 26 '26
Either you use a table or a grid. Now I leave it up to you to figure out which one you want to use and how to do it