View Single Post
Old 04-23-2022, 04:39 AM   #1
FrankJH
Member
FrankJH began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Oct 2021
Location: Stuttgart, Germany
Device: Galaxy Tab S7+
CSS problem: table-design

Dear all,

I hope my question doesn't appear too stupid to you - but I'm not an expert with
css, and I have not found an answer on google.

I designed a table for my epub in css via

Code:
table.DeclensionTable {
  background-color: #FFF;
  width: 60%;
  text-align: left;
  border: none;
  border-collapse: collapse;
  margin-right: auto;
  margin-left: 50px;
}
When I use the table, I'd like to have diffternt table widths - here's what I did

Code:
<table class="DeclensionTable" style="width: 80%">
It works, but I don't think it's good css practice, isn't it?

The length is variable here, can be 80%, 90% or whatever ...

Is there a better way to achieve this?

Best wishes, Frank
FrankJH is offline   Reply With Quote