Guest191218: Colspan und style width in Prozent

Beitrag lesen

Hallo,

Vorerst weg, ich bin kein HTML oder CSS Experte sondern Java Entwickler.

Ich brauche die Tabelle für ein Layout, das später in ein PDF umgewandelt wird. Deshalb schreibe ich den Style auch direkt in die Zelle.

Zum Punkt Doctype. Da kenne ich mich gar nicht aus. Ich brauche ein XHTML.

Ich wäre über jede erdenkliche Dankbar!

Meine Problem hat sich nicht gelöst.

Beispiel für Layout:

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
  <style>
body, p {
    margin: 0 auto;
}

mark {
    background-color: PaleTurquoise;
    color: black;
     font-size:8pt;
     line-height:10.83pt;
}

html, body {
    padding: 0;
}

table {
    border-collapse: collapse;
    table-layout: fixed;
    /* <TABLE> margin-left: 0pt; */
    /* <TABLE> margin-right: 0pt; */
    /* <TABLE> margin-top: 0pt; */
    /* <TABLE> margin-bottom: 0pt; */
    width:521.3pt;
}

table, td {
    border: 1px dashed grey;
}


table, td, p, span {
    font-size:8pt;
    line-height:10.83pt;
    font-family: "arial";
}

.selected {
    background: lightBlue !important;
}
</style> 
  <script type="text/javascript">
  
</script> 
 </head> 
 <body contenteditable="false" id="body" data-margin-left="13.0" data-margin-right="13.0" data-margin-top="17.0" data-margin-bottom="17.0" data-name="<Vorlage> (T-211218)" data-border-left="0.0" data-border-right="0.0" data-border-top="0.0" data-border-bottom="0.0" data-fs-header="false" data-fs-body="false" data-fs-footer="false"> 
  <div id="div_1545386012552" data-name=""> 
   <table id="header_table_1545386012552" contenteditable="true" data-columns="1" data-column-widths="521.3" data-type="header" hidden> 
    <tbody> 
     <tr id="tr_0_1545386012552" style="height:18.49pt;" data-row="0"> 
      <td id="CELL_0_0_1545386012552" data-column="0" data-row="0" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:521.3%;text-align:left;vertical-align:top;padding:2.83pt;"><p><span style="font-size:10pt;line-height:12.83pt;font-weight:bold;text-decoration:underline;">TEXT</span></p></td> 
     </tr> 
    </tbody> 
   </table> 
   <table contenteditable="true" id="table_1545386072087" data-columns="9" data-name="Zugversuch (ZV-R)" data-column-widths="56.72,45.25,68.08,36.91,34.09,73.61,73.71,73.71,59.22"> 
    <tbody> 
     <tr id="tr_0_1545386072087" style="height:28.5pt;" data-row="0"> 
      <td id="CELL_0_0_1545386072088" data-column="0" data-row="0" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:10.88%;text-align:left;vertical-align:top;padding:2.83pt;" colspan="9;" rowspan="1;" data-colspan-width="94.34pt;"></td> 
     </tr> 
     <tr id="tr_1_1545386072090" style="height:28.5pt;" data-row="1"> 
      <td id="CELL_1_0_1545386072090" data-column="0" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:10.88%;text-align:left;vertical-align:top;padding:2.83pt;" colspan="2;" rowspan="1;" data-colspan-width="13.9pt;"></td> 
      <td id="CELL_1_2_1545386072090" data-column="2" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:13.06%;text-align:left;vertical-align:top;padding:2.83pt;" colspan="3;" rowspan="1;" data-colspan-width="21.02pt;"></td> 
      <td id="CELL_1_5_1545386072091" data-column="5" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.12%;text-align:left;vertical-align:top;padding:2.83pt;background-color:#b3ccff;  border:1.0pt solid #000000; "></td> 
      <td id="CELL_1_6_1545386072091" data-column="6" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%;text-align:left;vertical-align:top;padding:2.83pt;background-color:#b3ccff;  border:1.0pt solid #000000; "></td> 
      <td id="CELL_1_7_1545386072091" data-column="7" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%;text-align:left;vertical-align:top;padding:2.83pt;background-color:#b3ccff;  border:1.0pt solid #000000; "></td> 
      <td id="CELL_1_8_1545386072091" data-column="8" data-row="1" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:11.36%;text-align:left;vertical-align:top;padding:2.83pt;background-color:#b3ccff;  border:1.0pt solid #000000; "></td> 
     </tr> 
     <tr id="tr_2_1545386072091" style="height:19.26pt;" data-row="2"> 
      <td id="CELL_2_0_1545386072091" data-column="0" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:10.88%; text-align: left; vertical-align: top; padding: 2.83pt; background-color: rgb(179, 204, 255);border:1.0pt solid #000000; " colspan="1;" rowspan="2;" data-colspan-width="5.22pt;"></td> 
      <td id="CELL_2_1_1545386072091" data-column="1" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:8.68%;text-align:left;vertical-align:top;padding:2.83pt;background-color:#b3ccff;border:1.0pt solid #000000; " colspan="1;" rowspan="2;" data-colspan-width="3.02pt;"></td> 
      <td id="CELL_2_2_1545386072091" data-column="2" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:13.06%; text-align: left; vertical-align: top; padding: 2.83pt; background-color: rgb(179, 204, 255);border:1.0pt solid #000000; " colspan="1;" rowspan="2;" data-colspan-width="7.4pt;"></td> 
      <td id="CELL_2_3_1545386072091" data-column="3" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:7.08%; text-align: left; vertical-align: top; padding: 2.83pt; background-color: rgb(179, 204, 255);border:1.0pt solid #000000; " colspan="1;" rowspan="2;" data-colspan-width="1.42pt;"></td> 
      <td id="CELL_2_4_1545386072091" data-column="4" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:6.54%; text-align: left; vertical-align: top; padding: 2.83pt; background-color: rgb(179, 204, 255);border:1.0pt solid #000000; " colspan="1;" rowspan="2;" data-colspan-width="0.88pt;"></td> 
      <td id="CELL_2_5_1545386072092" data-column="5" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.12%; text-align: left; vertical-align: top; padding: 2.83pt; cursor: row-resize;border:1.0pt solid #000000; "></td> 
      <td id="CELL_2_6_1545386072092" data-column="6" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%; text-align: left; vertical-align: top; padding: 2.83pt; cursor: col-resize;border:1.0pt solid #000000; "></td> 
      <td id="CELL_2_7_1545386072092" data-column="7" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%; text-align: left; vertical-align: top; padding: 2.83pt; cursor: row-resize;border:1.0pt solid #000000; "></td> 
      <td id="CELL_2_8_1545386072092" data-column="8" data-row="2" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:11.36%; text-align: left; vertical-align: top; padding: 2.83pt; cursor: row-resize;border:1.0pt solid #000000; "></td> 
     </tr> 
     <tr id="tr_3_1545386072092" style="height:21.14pt;" data-row="3"> 
      <td id="CELL_3_5_1545386072093" data-column="5" data-row="3" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.12%; text-align: left; vertical-align: top; padding: 2.83pt;border:1.0pt solid #000000; "></td> 
      <td id="CELL_3_6_1545386072093" data-column="6" data-row="3" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%; text-align: left; vertical-align: top; padding: 2.83pt;border:1.0pt solid #000000; "></td> 
      <td id="CELL_3_7_1545386072093" data-column="7" data-row="3" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%;text-align:left;vertical-align:top;padding:2.83pt;border:1.0pt solid #000000; "></td> 
      <td id="CELL_3_8_1545386072093" data-column="8" data-row="3" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:11.36%;text-align:left;vertical-align:top;padding:2.83pt;border:1.0pt solid #000000; "></td> 
     </tr> 
     <tr id="tr_4_1545386072093" style="height:28.5pt;" data-row="4"> 
      <td id="CELL_4_0_1545386072093" data-column="0" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:10.88%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_1_1545386072093" data-column="1" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:8.68%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_2_1545386072093" data-column="2" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:13.06%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_3_1545386072093" data-column="3" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:7.08%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_4_1545386072093" data-column="4" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:6.54%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_5_1545386072093" data-column="5" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.12%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_6_1545386072094" data-column="6" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_7_1545386072094" data-column="7" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:14.14%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
      <td id="CELL_4_8_1545386072094" data-column="8" data-row="4" onclick="clicked(this);" oncontextmenu="clicked(this);" onmousemove="moved(this, event)" onmousedown="clicked(this);" style="width:11.36%;text-align:left;vertical-align:top;padding:2.83pt;"></td> 
     </tr> 
    </tbody> 
   </table> 
  </div> 
 </body>
</html>

Gruß Guest191218

0 48

Colspan und style width in Prozent

Guest191218
  • css
  • html
  1. 0
    Gunnar Bittersmann
  2. 0
    Guest191218
    1. 0
      beatovich
    2. -1
      bobby
      1. 0
        Guest191218
        1. 0
          Gunnar Bittersmann
          1. 1

            Danke...

            bobby
            • menschelei
            1. 0
              Gunnar Bittersmann
              1. 1
                bobby
                1. 0
                  Gunnar Bittersmann
                  1. 0
                    bobby
                    1. 1
                      Gunnar Bittersmann
                      1. 0
                        bobby
                        1. 0
                          Gunnar Bittersmann
                          1. 0
                            bobby
                            1. 0
                              Gunnar Bittersmann
                              1. 0
                                bobby
                                1. 0
                                  Gunnar Bittersmann
                                  1. 0
                                    bobby
                                    1. 0
                                      Gunnar Bittersmann
                                      1. 0
                                        bobby
                                        1. 0
                                          Gunnar Bittersmann
              2. 1
                beatovich
                1. 0
                  bobby
                2. 0
                  Gunnar Bittersmann
                  1. 0
                    bobby
                    1. -1
                      Gunnar Bittersmann
                      1. 0
                        bobby
                        1. 0
                          Gunnar Bittersmann
                          1. 0
                            bobby
                  2. 0
                    beatovich
                    1. 0
                      Gunnar Bittersmann
      2. 0
        Gunnar Bittersmann
        1. 0
          bobby
          1. 0
            Gunnar Bittersmann
            1. 0
              bobby
              1. 0
                Gunnar Bittersmann
    3. 2
      beatovich
      1. 0
        Guest191218
        1. 0
          Rolf B
          1. 0
            Gunnar Bittersmann
            1. 0
              Rolf B
              1. 0
                Gunnar Bittersmann
                1. 0
                  beatovich
        2. 1
          Gunnar Bittersmann
          1. 0
            Rolf B
          2. 0
            Guest191218