Html table spacing between rows without css. v-data-table table { border-spacing: 0 0.
Html table spacing between rows without css I want the space to be added to tbody cells only not the thead. I'd be really glad if this is fixed. Feb 13, 2016 · Simply just adding a margin to the table will add spaces between tables But I would tell you that it's impossible to achieve the result as you have shown by using tables to do so you should replace them with Divs and you may need to use some javascript libraries. border-collapse: collapse; The code is below along with a jsfiddle. May 29, 2021 · 1 HTML : Apply Base 64 version of image, CSS etc 2 HTML : Applying styles to entire columns of table 2 more parts 3 HTML : Simplest way to refresh the page in X seconds 4 HTML : You can distinguish if the form button pressed 5 HTML : Apply cellpadding and cellspacing to table with and without using CSS 6 HTML : Disable resizing of textarea Oct 17, 2022 · The table has space between the rows and border around this rows, but no border between the columns. 5rem; } But both of those did not work. Is there a way I can do that when using display: table-row;. Jan 24, 2011 · I've got an image which I've sliced into 9 pieces, and created a 3x3 HTML table to display it. I have tried border-radius but it just won't work. The CSS for border-spacing – table { border-spacing: 30px; } It means that Apr 22, 2017 · First, id attributes should be unique in your page. if you look my code i had given many empty rows and column to make a space between two rows in the table. Example: This example shows the use of the CSS border-collapse property Then you can add margins to both of them, to adjust the spacing between the lines (you understand, of course, that this is a pretty minimal markup that expects content to be as big as to some limit). I also tried to create custom th Not without tricky css selectors and extra markup and the like. To add space between rows and columns, one can use grid-gap: [vertical] [horizontal]. Give the cells you want black a black class and the others with input the tdinput class. I just want my table to look like a spreadsheet with black borders. Make sure border-collapse is set to separate (or there will be a single border between each cell instead of a separate border around each one that can have spacing between them). If these icons and icontext will be clicked on to take the user to another page, then it's best that they be links (<a>). Jan 10, 2012 · Had the same problem, the border spacing property was adding space around the table as well, and to my knowledge, there wasn’t anyway to limit it to only ‘the inside’, so I used transparent borders instead: Feb 29, 2024 · Creating a table in HTML is a fundamental skill for web developers. To remove the last bit of vertical space between two table cells, one above the other, I tried many things, including border: none; padding: 0; margin: 0; on the table cells, and border-spacing: 0; border-collapse: collapse; on the table. Worth noticing: you will need this hack only if you have both borders and grid-gap HTML Table - Cell Spacing. I'm trying to display a table where each table row has a rounded border. When evaluating table spacing techniques to best fit your needs, consider: Complexity – Border and color solutions require only CSS and avoid disrupting HTML. The problem is there is extra white spacing around the bottom of the first and second row of the table. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. But no-break spaces give you very rough control. The border-spacing attribute can only be used if border-collapse attribute is set to separate. ) – Aug 12, 2010 · I have a table in my HTML yet I only want vertical spacing as it doesn't look right with the 25px horizontally. White gap between 2 rows in HTML table. Understanding Space Between Table Rows in HTML and CSS. each list item takes up several lines--and I don't want extra spacing between the lines within a list item; I only want extra spacing between list items. Dec 23, 2010 · Try making the border on the td and not on the input. I used classname and classes props on TableRow, TableCell, TableBody and Table, but nothing worked. EDIT: I have a table with cellspacing all the way around of 25px. Cell padding requires no extra CSS but more layout consideration. If it eventually becomes a W3C Oct 14, 2020 · I'm trying to create space between each rows of table component. Key Takeaways and Best Practices. Jan 30, 2024 · Sometimes, we may want to reduce the space between two adjacent columns in a table. This may be unwanted. Table Cell Padding. Jan 20, 2014 · The next approach I tried was to remove border-collapse: collapse and try to leverage the table's own cell spacing to achieve what I wanted. Why is that. I'm not using any CSS. 2. , the space between cells in adjacent rows). But my table get spaces between rows, but no spaces between columns. Sep 25, 2013 · I need to give space or break between two rows, so that my page will looks good. Tried with padding but that didn't work. I want the spacing between the 2 non combined rows to be closer whilst maintaining a larger spacing between the overall rows. Where border-spacing property is used to set the distance between the borders to its adjacent cells and border-collapse property is used to collapse adjacent cells and make a common border. Because margin is ignored on tr, I usually use a workaround, by setting a transparent border-bottom or border-top and setting the background-clip property to padding-box so the background-color does not get painted underneath the border. It's a CSS pseudo selector, you could just as easily give those tables class names and then change the CSS selectors to those class names and the demo would still work. Padding is the space inside a table cell, while spacing (or border-spacing) is the space between the outer borders of adjacent cells. I tried to use border-spacing attribute. Here's the code for that approach: HTML: Jul 11, 2014 · CSS to remove the spacing between the lines Hot Network Questions Short story or scene about recreating someone's words from the air in the room they spoke in Jul 27, 2017 · Please add an minimal working example so we can tell you what you can change. table:first-child would select the first table. Originally, I had an additional row <tr c Jul 13, 2015 · I have a grid that is using CSS display: table;. 5rem; } or. Without we have no possibility to explain it to you. You can use the following CSS to target the table's cell spacing. the id and password parts. HTML Jun 23, 2017 · I'm building an html email template and need to remove the spacing between table rows, but need to keep the cellspacing at 10px. No matter what I tried, it keeps some space between elements. Any help? Here's the code: Apr 30, 2012 · I am trying to add a table with space between cell as the background colour of the cell is white and the background color of the table is blue, you can easily see that padding and margin are not working (I am applying it to the td), it will only add space inside of the cell. Is there a way how to workaround it. (I also am writing HTML in a context where I can't use CSS code per se; I have to put the CSS inline. Jul 3, 2012 · I want to have lines separating my rows in an HTML table, and nothing more. – May 26, 2016 · For some reason I have a gap between my two bootstrap rows, I think it may be relating to bootstrap padding somewhere but I couldn't find anything that might be pushing the second row lower. You can apply CSS to your Pen from any stylesheet on the web. Leave row heights and alignments consistent. – Sep 8, 2019 · By default tables have a spacing between cells, that spacing is not part of the 'content' of the cell but only of the table. I'm looking to add spaces between these borders and not within the row itself. A better approach is to use CSS, e. By default the space is set to 2 pixels. Give them a right padding (margin doesn't work on inline elements):. border1 { border-top:thin solid; border-bottom:thin solid; border-left:thin solid; border-right:thin solid; border-color:black; padding: 5px; } HTML. Nov 17, 2008 · Of all of the answers given above, only djenson47's answers retain separation of presentation and content. e. I want to remove space between table column headers and their below row. HTML: Oct 3, 2016 · Updated on May 13th, 2021. Tables are used to organize data in a grid-like structure, making it easier to read and understand. This will give you some white space between the header and table content . I have a html table with 3 rows and 1 column. Use the border-collapse property with its "separate" value for the table. I want to make something similiar to this but with table rows I did this with <li>, fancy borders, etc and was really easy, but with table rows, I tried pretty much everything, tr, td border Jan 14, 2014 · I try to remove white space between Table1Header and Table2Header. I know of the border-spacing property that can be added to the table tag. It adds the spacing between header cells and body cells. Is that possible, how? And to take it further. However, it is more global. Remove spaces/borders between the rows/columns. There is no way to really set spacing between two td elements without setting spacing between all cells. For controlling "cellpadding" in CSS, you can simply use padding on table cells. I tried to use empty rows with some height. 2025-01-19 . Jun 10, 2017 · table { border-collapse:separate; border-spacing: 0 10px; } This sets the space between columns to zero and the space between rows to 10px. css should not affect any inner tables. In this guide, I‘ll show you step-by-step how to use CSS padding properties […] Jul 4, 2013 · A better solution than selected answer would be to use border-size rather than border-spacing. There used to be an HTML attribute named cellspacing, but it was obsoleted by CSS two decades ago. Prefer to declare the css at the table level. Space between CSS Table Rows. thead tr { border-bottom: 10px solid white; } Although setting the border colour is a bit of a cheat method, it will work fine. Jul 31, 2024 · Helpful for anyone less fluent with nitty-gritty HTML table syntax. Add space between two columns. Oct 11, 2024 · Removing cellspacing from tables using CSS means eliminating the default space or gaps between table cells. <table className="table-auto w-full shadow-md mt-5 rounded"> <thead className="bg-base-200 tex Oct 6, 2010 · elaborate on "space"? you can add padding to the td if thats what you mean by "space" table td { padding:5px; } if you just want that cell bigger, add a calss Jun 8, 2017 · I have a big problem with the spacing of columns in a table. I also tried cellspacing = 20 but it sets spacing for every cell and I want to style gaps after the rows. Between my rows I see a separation (I see background of my page). 5. Oct 24, 2016 · table{ border-collapse: collapse; } table tr td{ padding:5px; } . How can I achieve that? Dec 30, 2016 · Here is the code for a fairly simple table I made. Should use id or class so it doesn't affect every table in the site. Jun 6, 2018 · Basics. Dec 16, 2019 · I styled a HTML table like this. to add a margin: Aug 22, 2021 · I would like to customize the spacing between table cells. HTML Table - Cell Spacing. The best trick is to add a div container as the only child of each td or th. here is my sample code: May 31, 2024 · When two <length> values are specified, the first value defines the horizontal spacing between cells (i. CSS2 section 17 requires that display:table-row elements be within display:table-row-group, -header-group, or -footer-group elements. If you just need space between the rows it is an good idea to create eg. multiple elements to share the same CSS class) Nov 18, 2011 · I'm looking for the best way of adding space between the elements using CSS only [no space] [1] [space 10px] [2] [space 10px] [3] [no space] Additionally: May 19, 2010 · This should be a simple problem, but I am have a tough time getting the html to display the way I want it The problem is the space between my table rowsI don't want space between my rows. How do I reduce the space? CSS (inside HTML / Head / Style elements) The CSS I currently have working for every row looks like this-table{ border-collapse:separate; border-spacing: 0px 3px; } td{ border: 1px solid black; padding: 5px; } What I would like to achieve is this: CSS. Here, we have used the CSS border-spacing property. May 2, 2011 · Learn how to format tables in HTML without using CSS on Stack Overflow. Jul 31, 2024 · Cons: Can Visually Disconnect Rows If Overused. Try Teams for free Explore Teams If a shared border has a 'border-color' contention, the suggested priority should be used (decreasing from left to right): Table cell, table row, row group, column, column group, table. pseudo rows afterwards. There isn't a special version of it for tables. table { border-spacing: 10px 0; } The first value specifies the horizontal spacing, and the second value specifies the vertical spacing. For more information you better look at the MDN page about border-spacing. Please say any other proper way to give space between two rows. table{ border-collapse:separate; } table tr:nth-of-type(odd){ border-spacing: 0px 3px; } td{ border: 1px solid black; padding: 5px; } HTML The layout issue is due to your floated element (caret). Ask Question CSS Table within Table, Space between rows (not columns) 0. Can anybody, please, help me to solve this problem. 0. In this article, we will learn how to create a simple table in HTML with borders, without using CSS styling. table { border-collapse:collapse; } Note W3Schools offers free online tutorials, references and exercises in all the major languages of the web. For example, I would like row1 col1 and row2 col1 to be spaced closer together whilst having a larger space between row2 col1 and row3 col1. span { display: block; } If you wish to add spacing and not a new line you can add the html entity in between your 2 spans Sep 16, 2024 · The border-spacing property is used to set the spaces between cells of a table and border-collapse property is used to specify whether the border of the table is collapsed or not. Apr 22, 2011 · Table row borders in HTML5 without gaps. As I have read through the book CSS Mastery Advanced Web Standards Solution, 3rd 3, the book has mentioned in ch9 that using border-collapse: collapse; can result empty spacing on vertical border using IE/Edge. Jan 28, 2016 · I have a css table and am trying to make a space between each row, the gap should have no color. The browser's default property for the Spacing is 2px. Also, if you put in an image with a width greater than the cell width, the cell will again expand. S: I also checked out the element on Chrome, element reaches the related css lines successfully. I would only like vertical cellspacing of 25px. Oct 14, 2010 · I am displaying dynamically a table and just need to tweak the CSS so that there is space between the rows, separated by a line, that is all. Does anybody knows a solution? Mar 18, 2015 · Tables are notorious for sizing themselves however they feel. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself. 5rem; I tried setting it with css: v-data-table > div > table { border-spacing: 0 0. But i also use bootstrap-table for sorting and filtering. The div container will maintain width and height effectively, and there should be no problem with the layout breaking down. g. Nov 15, 2017 · But with recent web design techniques, it is recommended to separate html markups from layout and design element. Add a border on table, td and th to better understand it. To prevent "too thick / double border" with zero grid-gap, one can add margin: -1px to the cell styling. Syntax: Mar 27, 2013 · Inline Styling does work - but I have found the above solution to be the best for security. To change the space between table cells, use the CSS border-spacing property on the table element: Use the border-spacing property on the table element to set the spacing between cells. Use class instead for this particular use case (i. my-td-left{ background: white; margin-bottom: 30px; width: 50%; height: auto; vertical-align: top Feb 29, 2020 · What do you mean by "I cannot use CSS", CSS is as old as HTML is, back in the days we used tables to align elements and of course CSS too, so for both 2 points HTML table is the answer, but why not using CSS? – Oct 10, 2017 · I have a table that uses rowspan to combine 2 rows. ; Use the border-spacing property to set the distance between the borders of neighbouring table cells. If you should have some time, could you please tell me why the td > h3,p{ padding-left: . I have to put this background color in row without spaces ? Thank you very much. That way you wont have to add any more elements, just the label-input pairs, all of them wrapped in a form element. May 23, 2014 · I have table and I have to use css rule to separate table-cells (border-spacing: 10px;border-collapse: separate;), but when I to put background-color in table row, then it shows this color in each table-cell with 10px spaces. Any ideas on what I can try or might be doing wrong? P. If table have a "height" attribute and you replace some images with shorter content, table maintain height adding mysterios gaps between images. Syntax Be careful, though, because setting white-space: nowrap will negate the table-layout: fixed; the cells will again expand to fit the contents. I've tried multiple solutions Dec 13, 2022 · Learn how to separate table rows with a line in HTML and CSS. Is there any way to get these both things to work? Dec 15, 2011 · Whether it works depends on the browser; the correct notation is with a semicolon (as mentioned by nyarlathotep). How to add space between CSS table rows? 3. I tried various tricks but nothing worked. I am using a datalist and have a table in the datalist control's templates. HTML May 6, 2020 · So, how can you remove gaps between HTML rows and cells? There are three main ways to remove gaps between table and cells: Using the border-collapse and border-spacing properties in CSS; Adding CSS reset to your code; Using the cellspacing table attribute (deprecated). Here's a of what's happening. In the top and button row I have images and in the middle row I have div. Cell spacing is the space between each cell. Jun 20, 2012 · need to post your html and css but you could try img (note there is no space between the two image tags) Image in HTML - spacing between rows in HTML table. You will see in the example blue title bars and the spacing beneath them. Thanks. html; css; bootstrap-5; or ask Table without border after Jun 25, 2022 · I am new to tailwind and trying to add space between table rows. Is there any way to add space? CSS. Dec 28, 2017 · Adjust spacing between HTML table rows. I dont want that the rows look squeezed against each other. I couldn't get (2) to be visible until I styled the table border-collapse: collapse;. Dec 24, 2016 · Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand Jun 10, 2017 · The thread seems to suggest that table-row padding support never existed in CSS standards because it would have complicated layout engines. To achieve this, you will have to use css. , the space between cells in adjacent columns), and the second value defines the vertical spacing between cells (i. Image split into table: Remove space between rows. If your page shrinks in width, then the columns of your HTML table will also shrink and may cause your elements to wrap onto two lines. 4. The difference between these concepts is relevant e. Spacing issue with image placed in table - HTML and CSS. By adding padding between columns, we can create the ideal spacing and alignment to make tabular data shine. I tried to set all padding and margins to zero (for tables, div and images) and I still have this separation. Simple enough, right? Some Googling brought me upon the table attribute rules, but apparently this isn't supported in HTML5. Jul 13, 2019 · Remove this. CSS injection attacks can occur with in line styling and things like NPM Helmet put restrictions on Inline Styling. Here are the primary methods: CSS border-spacing Property. In this guide, I‘ll show you step-by-step how to use CSS padding properties […] Dec 15, 2011 · The best way to add a horizontal line between rows is with a CSS borders. I need spaces only between rows in table body. This does that. Sep 19, 2013 · The element in HTML is used for displaying tabular data. What they say is padd the cells. Sep 8, 2015 · HTML table without space between columns. I hardcoded into the html table the cellpadding and it has no effect whatsoever. – Aug 31, 2018 · Also, you don't need to add all the css details to each row and column; just add: or or ; and then in your css sheet (If you don't have it then just create on) add td Jun 13, 2014 · On my situation, I am trying to continue coding photoshop / imageready splitted html (generated via slice tool or save for web). I can see no attribute in HTML to do this so is it possible? Thanks in Advance, Dean . First, you want to collapse all the borders of the table so that there is no space between the cells (this might help your solution as well, but I don't recommend using hr for this purpose). css URL Extension) and we'll pull the CSS from that Pen and include it. So I searched deeper into CSS and realized I could put borders around the tr's, right? Jun 4, 2012 · A table with one header row and multiple body rows; A solid border under the header row; Vertical white space (padding? margin? spacing?) between the header row and first body row only; Body rows being highlighted on mouse hover. 5rem;padding-bottom: 1rem;} only applies at the middle td? Aug 1, 2012 · display:block worked great for the gap problem between my body and footer, but it didn't do anything for my header; neither did the other fixes. icon-pencil { padding-right: 1em; } If you want to avoid the space after the last icon, you can give the surrounding table cell a negative right margin (so the two eliminate each other) or use more complex CSS rules to cancel the last gap. I tried to add a border-spacing to the class table, but this will result in a spacing between all rows and not only between the table-row-groups. I want the image in the second row to be pushed up so it's beneath the first row (the row highlighted in the image). The drawback of the collapsed border model method is that you can no longer use the table's border or cellspacing attributes to separate the individual cells. if the cells have background or border set. Sep 21, 2013 · The problem is that there is too much space between the two rows i. cell-padding:0px; The property is called padding. Firefox and Opera tell me that my border-spacing style is override Apr 29, 2018 · I have a little problem. Evaluating Approaches As A Developer. Please note that I am also using Eric Meyer's Reset CSS v2. Korpela suggests, and set padding on all the elements except the last tr child using a combination of the :not()/:last-child pseudo classes. What I would do is wrap the caret and number in a div (HTML table) and in turn put the caret and number in a separate span (HTML table cell). I can get space with border-collapse, but then I won't be able to get rows with rounded corners. Jan 19, 2025 · Creating Space Between Table Rows in HTML . In the 30 September 2014 Editor's Draft of CSS basic box model, padding and border properties exist for all elements including table-row and table-column elements. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. Fine. 1. But my table has header with multiple rows which are also affected by it. I have tried a few things that have not worked such as: border-bottom: 5px solid transparent; border-top: 5px solid transparent; and. In HTML and CSS, we can manipulate the spacing between table rows to enhance readability and visual appeal. E. Example without cellpadding: table { border-spacing: 0; } td, th { padding: 10px 20px; } Apr 10, 2015 · How can I add space between table border (all sides) and text. To change the space between table cells, use the CSS border-spacing property on the table element: Nov 12, 2024 · HTML Table Padding and Spacing Table Cell Spacing. HTML Table Cell Spacing defines the space between the cells within a table. Apr 18, 2017 · Yes that's better, but still not ideal. See my updated answer, which I have turned into a snippet you can run to view. But without proper formatting, tables can feel crowded and hard to read. icon-ok { padding-right: 1em; } . This will give the effect of a <br> tag without manually adding it and cluttering up our html. Don't want to use empty tr's to simulate a blank row. We can achieve this by applying CSS properties to the table elements. Aug 21, 2019 · I have a table and I want to style spacing for every row in the table. (There used to be an HTML attribute named cellpadding, but again, CSS came along in the '90s and it isn't needed any more). While I could remove the vertical spacing by using border-spacing, I couldn't figure out how to remove the horizontal spacing from the far left and far right cells. I want to remove this red marked space without disturbing others. Dec 27, 2023 · HTML tables are powerful tools for displaying complex data on the web. May 14, 2014 · Note that tables next to tables (in the code, but stacked on page) make bigger gaps than table rows, and by setting the color on a wrapping parent element, you can hide the 'line' created when they separate. HTML Jan 28, 2016 · I have a css table and am trying to make a space between each row, the gap should have no color. Table Cell Padding refers May 21, 2015 · how to reduce space between rows in a html table. You can achieve the same like so : table {border-spacing:0;border-width:0;} table td {padding:2px;border-width:0;} With css, you will also have to specify if the borders are going to be I had a similar problem, but it didn't involve an HTML template. Apr 15, 2020 · A modern solution to create a table would be using CSS grid or flexbox. Sep 11, 2014 · What I want to do now, between each table-row-group should be a space but not between the table-rows. All I have to remove the height. You can set the background on table rows and it will show as (I never new about the CSS property Mar 4, 2020 · I'm trying to change border-spacing iin the v-data-table to: border-spacing: 0 0. In this article, we will see the different approaches to reducing the space between two columns in an HTML table. for 10px of "cellpadding": td, th { /* table cells */ padding: 10px; } For "cellspacing", you can apply the border-spacing CSS property to your table. Let’s say we have a table that looks like the following: May 29, 2021 · 1 HTML : Apply Base 64 version of image, CSS etc 2 HTML : Applying styles to entire columns of table 2 more parts 3 HTML : Simplest way to refresh the page in X seconds 4 HTML : You can distinguish if the form button pressed 5 HTML : Apply cellpadding and cellspacing to table with and without using CSS 6 HTML : Disable resizing of textarea Aug 12, 2009 · Floating table rows isn't legal according to the CSS specification. You can also link to another Pen here (use the . I have a table that has a series of bullet points. Something like this might do (using CSS selectors): table { border:none; border-collapse: collapse; } table td { border-left: 1px solid #000; border-right: 1px solid #000; } table td:first-child { border-left: none; } table td:last-child { border-right: none; } Nov 12, 2024 · HTML Table Padding & Spacing is used to control the space within and around table cells in HTML. Jun 6, 2012 · A better way than setting cellspacing="10" is to use CSS. Here's what I'd like to get, spacing only between <td>: Not working with margin, padding or border: td { padding-left: 7 Oct 8, 2013 · I have multiline list items--i. However, the floating algorithm according to section 9 injects an anonymous block parent. If you supply one argument, then that length will be applied to both the vertical spacing and the horizontal spacing; with two arguments, the first will set the horizontal spacing and the second will set Nov 10, 2012 · Technically, this does not add spacing between the td elements as requested, even though it spaces their contents apart. My code: Jan 17, 2020 · The space between two rows can be adjusted using border-spacing and border-collapse property in CSS. I want the gap after the first row to be small (for example 1px) and 20px after the second row. What I would like to do is to have a gap between the rows. Based on all these techniques and factors, what are some core guiding principles for adding column spacing to tables? Mind the verticals – Only apply horizontal spacing between columns. Add CSS. Any idea how can i change space between rows in v-data-table? Oct 8, 2022 · Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand May 18, 2011 · What's a good way to add some space between html table rows using css? Should work in all browsers including IE6. v-data-table table { border-spacing: 0 0. 0. The problem with this table is that whenever I create a new row, Outlook decides to add extra spacing below each row, making my table look larger than it should be. Sep 19, 2013 · It's worth noting that the space can be reduced by collapsing the table's borders: table { border-collapse: collapse; } You could do something similar to what Jukka K. It includes both horizontal and vertical spacing. This can be achieved with properties like border-collapse: collapse or border-spacing: 0, resulting in a more compact and seamless table layout. I tried border:0px, padding:0px and border-spacing:0px; styles. The main problem with using border-spacing is that even the first column would have a spacing in the front. Ask Question Asked 7 years, 1 month ago. In other words, you should have only one id (with the same value) per page. I already tried padding You could use the border-spacing property, as the accepted answer suggests, but this not only generates space between the table cells but also between the table cells and the table container. Margin and padding does not seem to work. I want to get space between table rows and that rows had rounded corners. Form investigation, you can't set box-shadow to a table row, but you can to table cells: th { box-shadow: 5px 5px 5px 0px #000000 ; } Feb 1, 2019 · Essentially table:nth-child(2n) selects the second table element in the demo. This would apply to each I'm trying to get this result, but instead I have a white space between the table rows. I know this is an old thread, but in case anyone stumbles across it and the above didn't help, this did it for me: Note: this approach is very old, so it is better to use CSS solution that lets to switch between different styles without page template modifications (without HTML code modification) - with CSS we can change spaces with different web page themes. kkvkh izxhr ajkivx jpopf qgnr oqqjir ywcic vonp haher dqjk kslsuw byteab tpmtet fqv gdacolbf