+ 4
Why isn't the width changed with in my css
Created a webpage with labels and to improve the look of the page I want the labels to be of fixed width. I place d this in the CSS file but it didn't work. The CSS I used was this label { width: 200px;} Please help https://code.sololearn.com/WlSgVu8z84IN/?ref=app
8 Antworten
+ 4
Thank you, Jan Markus . I initially found your response a bit confusing after I posted mine. However, upon revisiting Gray Adamson's code with fresh eyes, I realized their intention was to generate tables rather than create a single table. Now I understand the context better.
In hindsight, I believe my initial statement could have been helpful for the next steps in building the table. Unfortunately, I deleted my post without realizing its potential usefulness. Anyway, I agree with your suggestion that using Flexbox or Grid layout would be a good choice for styling their page.
+ 3
what about this one?
https://code.sololearn.com/W4LKw3fhc2du/?ref=app
+ 3
Gray Adamson Sorry about that, to avoid diverting attention from your post, if you still require assistance with your project, please don't hesitate to reach out, and I'll be more than happy to offer a more comprehensive answer than my previous one!
+ 2
Jan Markus You are correct I've read that too. I wouldn't use a table to lay out an entire webpage. HTML tables should be used for tabular data — this is what they are designed for.
+ 1
Chris Coder
Yes, and the table tag should be seen as a semantic element like header, footer, article or aside.
0
Try adding the CSS code display:inline-block; on the label
Since the label element is an inline element by default, it will not take up more width even if you specify it's wdith.
0
It looks fine I guess
0
Chris Coder
I read somewhere that today a page layout shouldn't be done with html tables. In the past, and I speak about the late 1990s, it was widely common to use tables for layout because CSS was still in its infancy back then.
Today Flexbox or Grid Layout are the most important tools of choice.