Rowspan replaced by another attribute

Asked

Viewed 100 times

-1

I wonder if the "rowspan" property of css has been replaced by another equivalent and what this new property would be.

1 answer

7


First of all, maybe you’re not finding the reference to rowspan in the CSS pq rowspan is not a CSS property, he actually, just like the colspan, rowspan is an HTML attribute!

Yes both colspan how much rowspanare "alive"! And are accepted in 100% of browsers as you can see in this Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td

These properties are global attributes of TD and TH and are defined in HTML, right in the tag, not in CSS. For example that doesn’t exist th, td { colspan: 3 }

Here’s an example of an application. Note that neither CSS has this code, and colspan and rowspanare used directly in the HTML tag, as would be a name or title, or any other global attribute of HTML

td, th {
  border: 1px solid #000;
}
<table>
  <thead>
    <tr>
      <th>normal</th>
      <th colspan="2">colspan="2"</th>

    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>10000</td>
      <th rowspan="3">rowspan="3"</th>
    </tr>
    <tr>
      <td>2</td>
      <td>20000</td>
    </tr>
    <tr>
      <td>3</td>
      <td>30000</td>
    </tr>
  </tbody>
</table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.