CSS-Grid instead of <table> [closed] - css

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Is it good practice to use CSS display: grid instead of the html tag <table>?
There are many times when <table> in responsive design is difficult to use. Especially for complex shop basket tables and handling colspan etc. However with css-grid it's an easy one.
I see some problems in styling rows like <tr> for table. There are ways with nth-child stuff. What do you think about it?

If you know CSS grid and are comfortable using it, there is no good reason not to use it. Support is good enough CSS grid support at this point
In fact I highly recommend using anything over <table> for layout. Tables should be used for tables with data in it. Flexbox is also a great option depending on the situation. Ideally you would know when CSS grid is appropriate and when flexbox is, or when both can be used in tangent.
In conclusion it is 2018 and tables should be used as little as possible for this purpose. Move towards the future with flexbox and CSS grid.

Related

Which approach is preferable for creating a grid - flexbox, css-table or inline-block? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Which approach is preferable for creating a grid - flexbox, css-table or inline-block?
Or may be each of this technics should be used in specified cases?
If so, in what cases should be they used?
each has benefits and disadvantages.
Flexbox is very useful in many cases, but some browsers still lacks the features.
Tables may sound oldskool, but if you are coding an html mailing, it is still the best way.
I think before starting a project, you should check other projects and search on google what is best for you scope.
Flexbox is becoming the most popular among web developers these days. Websites have been able to get much more responsive on different screen sizes over the last few years which is why using flexboxes is the most popular at this point. It is finally supported on all of the main browsers and provides a good interface for building anything.
Using inline-blocks is still useful however, in different parts of a website, usually with less elements or only two columns, such as a image or an icon next to a body of text.

Logo image in <div> or not in <div> - pros and cons? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm using src img to place a logo in the header section. What would the pros and cons be of placing the image in a < div > vs leaving it as a plain ol' img src?
I'm thinking that, for the most part, I should be able to apply the same properties (such as margin, class, ID, etc.) to both. Am I missing something?
Note: I'm not interested in a background-image since I consider the logo content.
tl;dr wrapping is always good thing, if you are going to maintain that code for long enough time.
because you can created very targeted css, show, hide could be easier, round corners and adding text for accessibility will be easier etc..

Jeet Grid vs. Singularity [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
For a mobile-first website, i need a grid with SASS preprocessor functions. Currently i am using the Bootstrap 3 Grid which works fine but seems to lack flexibility. Especially i do not want to clutter my html with additional css classes like row or column-4.
I found two promising alternatives:
Jeet Grid
Singularity
Both have powerful tools at hand to span columns, change breakpoints, modify gutters, etc. Can you give a short overview of pro's and con's for both?
creator of Singularity here.
Both are fantastic and very similar. Singularity is more focused on just doing grids and little else while Jeet is more of a full-featured framework, not just the grid. Cory, who created Jeet, is great with support as well.
You may also want to look into Susy which has a strong community behind it as well.
Neat isn’t as full featured as any of these other grid systems listed but it is really elegant and simple to use so it might fit your needs.

Using display:table for layout / presentational purposes? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Some people think both HTML <table>s and display:table should be used for tabular data exclusively.
I instead think that display:table doesn't have any implicit semantic meaning and that it can be used for layout / presentational purposes, as well as for displaying tabular data.
Is there anything wrong with using display:table for layout purposes? If so can you provide more details?
References to specifications etc. are welcome.
Yes. Markup is markup (and HTML is markup designed to convey semantics). Presentation is presentation.
When I need a shrink-to-fit block element that allows me to vertically center content, then I will use display: table and display: table-cell as needed.
I will not use a <table> to create a page size grid. Instead I will use a CSS framework like Twitter Bootstrap.
However, I will use a one-row/one-cell table is I need it to fix a centering problem that needs to work in older IE browsers that do not support CSS tables.
As a professional developer, I need to get the job done in a timely fashion and sometimes I will add extra mark-up if that what it takes to get the task finished.

Have you ever used these css properties? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
In what cases these are useful?
table-layout
font-stretch
font-size-adjust
orphans and widows
marks
clip
orphans and widows are used commonly in print to avoid a single line at the bottom or top of a page.
More info can be found here just do a quick search
http://www.w3schools.com/Css/pr_tab_table-layout.asp
I use table-layout: fixed a fair amount, but the others not so much. I've found that table-layout: fixed, along with <col> tags will speed up the rendering of a page with a very large table because the browser doesn't need to process the contents of all data in the table to calculate column sizes. It is also useful to have two tables with columns that align perfectly.
Clip looks like it could be useful, but I haven't used it before. A good article on clip is here:
http://www.ibloomstudios.com/articles/misunderstood_css_clip/
Orphans, widows, and marks are useful in print stylesheets I believe. And the font ones are for scaling height/width of fonts. I'm not sure how supported any of those are, but table-layout is well supported.

Resources