Thread [Forum] Code-Box: Zeilennummern nicht bündig zu Codezeilen (31 answers)
Opened by GwenDragon at 2009-04-19 15:15

topeg
 2009-04-23 14:31
#120835 #120835
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
Ich habe mich mal hin Gesetzt und ein wenig experimentiert.
Ich glaube ich habe eine Lösung.
Leider kommt sie nicht nur mit Änderungen am CSS aus.

Wenn man jede Codezeile mit einem <span class="line">....</span> umgibt kann man mit ".code span.line{ line-height:1.3em }" und ".code span.linenum{ line-height:1.3em }" eine feste Höhe für den Text in beiden Tabellenspalten erzwingen.

Ich habe aber reichlich andere Veränderungen an der pboard.css gemacht, sodass ich erstmal nicht weiß ob es noch noch andere Auslöser gibt.

Deshalb poste ich hier mal die editierte CSS:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
table.message_table {
width: 100%;
padding: 0em;
margin-top: 2px;
border-spacing: 0px;
}

table.message_table th {
background-color: #e8e8e8;
text-align: left;
padding: 0em;
margin: 0em;
}
table.message_table td {
padding: 0px;
margin: 0px;
}
div.message_table {
padding: 0em;
margin: 0em;
}
table.message_title_buttons, table.message_title_buttons td {
margin: 0em;
padding: 0em;
}
table.unread_msg {
border-left: 2px solid #0000ff;
}

cite {
font-variant: small-caps;
font-style: normal;
}

blockquote {
border-left: 8px dotted #dd3388;
border-bottom: 2px dotted #dd3388;
border-top: 2px dotted #dd3388;
margin-left: 0px;
padding-left: 0px;
padding-top: 0px;
padding-bottom: 1ex;
margin-top: .5ex;
margin-bottom: .5ex;
margin-right: 0px;
padding-right: 0px;
}

blockquote > .date {
float: right;
font-size: smaller;
}

blockquote > cite {
display: block;
background-color: #ffc0c0;
padding: 1px;
}

blockquote > div {
padding-left: 1.5em;
}

.code pre {
line-height: 1.3em;
font-size: 95%;
font-family: "Courier New, Courier", Monospace;
color: #3333aa;
}

span.minicode {
border: 1px solid #cccccc;
font-size: 95%;
font-family: "Courier New, Courier", Monospace;
background-color: #ffffff;
color: #3333aa;
}

.code{
border-collapse:collapse;
}

.code span.line
{
line-height: 1.3em;
}

.code td{
border: 1px solid black;
background-color: #e0e0e0;
}

.code th {
background-color: #eeeeee;
font-style: italic;
color: black;
padding: 0px;
padding-left: 10px;
font-size: smaller;
font-weight: normal;
text-align: left;
}

div.code {
max-width: 50em;
min-width: 30em;
overflow:auto;
}

div.signature .code th {
display: none;
}

td.codelines {
vertical-align: top;
}

div.codelines pre {
color: #7777aa;
}

div.codelines span.linenum{
line-height: 1.3em;
}

ul.message_tree {
border-left: 1px dotted #88aaff;
padding-left: 2em;
list-style:none;
margin: 0em 0em 1em 0em;
padding-right: 0em;
padding-top: 0.3em;
}
ul.message_tree_last {
border-left: 0px solid #ffffff;
padding-left: 0.7em;
}
ul.message_tree:hover {
border-left: 1px solid #88aaff;
}
ul.message_tree_last:hover {
border-left: 0px solid #ffffff;
}
ul.message_tree_root {
margin: 0.5em 0.5em 0.5em 0.5em;
padding-left: 0em;
}

li.message_tree {
border-left: 1px solid #88aaff;
margin-left: 0em;
margin-bottom: 0.5em;
list-style:none;
padding-right: 0em;
}
li.message_tree_last {
border-bottom: 1px solid #88aaff;
}

td.posting_headline a {
color: #003366;
text-decoration: none;
}
td.posting_headline {
color: #000000;
background-color: #e8e8e8;
margin: 0em;
padding: 0em;
}
td.author_info {
border-right: 1px dashed #aaaaaa;
width: 100px;
}
td.posting_content {
height: 100%;
padding-bottom: 1ex;
padding-right: 5px;
}
td.posting_status {
background-color: #dddddd;
}
td.posting_content div.signature {
font-size: smaller;
margin-top: 1ex;
margin-right: 20px;
padding-left: 2em;
border-top: 1px dashed #3366bb;
background-color: #eeeeee;
}

label.board_label {
font-weight: normal;
color: #00aaaa;
}
label.board_label_selected {
font-weight: bold;
color: #ff0000;
}

table.board_admin td.board_name {
margin-right: 0em;
background-color: #eeeeee;
}
table.board_admin {
padding-right: 0em;
width: 100%;
}
table.board_admin td.board_label {
background-color: #eeeeee;
width: 20;
}
table.board_admin td.board_target {
background-color: #dddddd;
width: 380;
}
ul.board_root {
padding-right: 0em;
margin-right: 0em;
margin-left: 0em;
padding-left: 0em;
list-style-type: none;
}
ul.board_tree_last {
margin-right: 0em;
padding-left: 2em;
border-left: 1px dotted #888888;
list-style-type: none;
}
ul.board_tree {
padding-right: 0em;
margin-right: 0em;
padding-left: 2em;
margin-bottom: 0.5em;
padding-bottom: 0.5em;
border-left: 1px dotted #888888;
border-bottom: 1px dotted #888888;
list-style-type: none;
}

li.board_tree_last {
padding-right: 0em;
margin-right: 0em;
}
li.board_tree {
padding-right: 0em;
margin-right: 0em;
}

li.board_tree th, li.board_tree_last th {
margin-top: 1em;
padding-top: 0.5em;
text-align: left;
}

table.board_tree {
border-bottom: 1px solid #cccccc;
}
table.board_tree td{
border-right: 1px solid #cccccc;
vertical-align: top;
}
table.board_tree th{
background-color: #eeeeee;
text-align: left;
}

.board_breadcrumb {
margin-top: 0.3em;
padding: 0.1em;
background-color: #fff8ee;
border: 1px dotted #aa9999;
font-size: 110%;
}
.board_breadcrumb a {
text-decoration: none;
}


Ich hätte gerne noch mehr gemacht, aber meine Mittagspause ist um...

View full thread [Forum] Code-Box: Zeilennummern nicht bündig zu Codezeilen