С Новым годом! Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 5.00/8: Рейтинг темы: голосов - 8, средняя оценка - 5.00
1 / 1 / 0
Регистрация: 13.09.2011
Сообщений: 19

Неправильное отображение элементов таблицы в опере

16.11.2012, 05:36. Показов 1737. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Почему работает во всех браузерах корректно, а в опере не отображает элементы таблицы до наведения?
JavaScript
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
<HTML>
<head>
<meta http-equiv = "Content-Type" content = "text/html; charset=utf-8">
<title>Graphics</title>
<script type = "text/javascript" src = "lib/jquery.js"></script>
<script type = "text/javascript" src = "lib/jquery.flot.js"></script>
<script type = "text/javascript" src = "lib/jquery.flot.stack.js"></script>
<link rel = "stylesheet" type = "text/css" href = "lib/style.css">
<!--[if IE]><script type="text/javascript" src="lib/excanvas.js"></script>
<link rel = "stylesheet" type = "text/css" href = "lib/iestyle.css"><![endif]-->
<script type = "text/javascript">
 
var TABLE;
var OPTIONS;
 
function main()
{
    TABLE = document.getElementById('table');
    var dom = 100;
    arandom(dom);
    average();
    drawGraph(1);
}
 
function average()
{
    for(var j=1; j < 4; j++)
    {
        var sum = 0;
        for(var i=2; i < 10; i++)
            sum += parseInt (document.getElementById('t' + i + (j + 1)).value);
        TABLE.rows[9].cells[j].innerHTML = parseInt (sum / 8);
    }
}
 
function drawGraph(gType)
{
    TABLE = document.getElementById('table');
    switch(gType)
    {
        case 1 :
            drawLine();
            break;
        case 2 :
            drawBars();
            break;
        case 3 :
            drawDots();
            break;
    }   
}
 
function arandom(dom)
{
    for(var i=2; i < 10; i++)
        for(var j=2; j < 5; j++)
            document.getElementById('t' + i + j).value = 
                parseInt (Math.random() * dom);
}
 
function draw()
{
    var d1 = new Array();
    var d2 = new Array();
    var d3 = new Array();
    var d4 = new Array();
    for (var i=2; i < 10; i++)
    {
        d1.push( [i, document.getElementById('t' + i + 1).value] );
        d2.push( [i, document.getElementById('t' + i + 2).value] );
        d3.push( [i, document.getElementById('t' + i + 3).value] );
        d4.push( [i, document.getElementById('t' + i + 4).value] );
    }
    
    var series = [
        {
            data: d2,
            label: document.getElementById('t12').value  
        },
        {
            data: d3,
            label: document.getElementById('t13').value 
        },
        {
            data: d4,
            label: document.getElementById('t14').value
        }
    ];
    OPTIONS.xaxis = {ticks: d1 } // add common property
    $.plot("#placeholder", series, OPTIONS);
}
 
function drawLine () 
{
    OPTIONS = {};
    draw();
}
 
function drawBars () 
{
    OPTIONS.series = 
    {
        bars: {show: true },
        stack: true
    };
    draw();
}
 
function drawDots () 
{
    OPTIONS.series = 
    {
        points: {show: true }
    };
    draw();
}
</script>
 
</head>
 
<body onload = "main()">
<table onclick = "average()" id="table" border="1px">
<tr>
    <th><input type="text" class="th2" style="text-align: center" id="t11" 
        value="Месяц / Продажи"/></th>
    <th><input type="text" class="th shadowyellow" id="t12" 
        value="Конфеты"/></th>
    <th><input type="text" class="th shadowblue" id="t13" value="Печенье"/></th>
    <th><input type="text" class="th shadowred"  id="t14" value="Пряники"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t21" value="Январь"/></th>
    <th><input type="text" class="td shadowyellow" id="t22"/></th>
    <th><input type="text" class="td shadowblue"   id="t23"/></th>
    <th><input type="text" class="td shadowred"    id="t24"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t31" value="Февраль"/></th>
    <th><input type="text" class="td shadowyellow" id="t32"/></th>
    <th><input type="text" class="td shadowblue"   id="t33"/></th>
    <th><input type="text" class="td shadowred"    id="t34"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t41" value="Март"/></th>
    <th><input type="text" class="td shadowyellow" id="t42"/></th>
    <th><input type="text" class="td shadowblue"   id="t43"/></th>
    <th><input type="text" class="td shadowred"    id="t44"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t51" value="Апрель"/></th>
    <th><input type="text" class="td shadowyellow" id="t52"/></th>
    <th><input type="text" class="td shadowblue"   id="t53"/></th>
    <th><input type="text" class="td shadowred"    id="t54"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t61" value="Май"/></th>
    <th><input type="text" class="td shadowyellow" id="t62"/></th>
    <th><input type="text" class="td shadowblue"   id="t63"/></th>
    <th><input type="text" class="td shadowred"    id="t64"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t71" value="Июнь"/></th>
    <th><input type="text" class="td shadowyellow" id="t72"/></th>
    <th><input type="text" class="td shadowblue"   id="t73"/></th>
    <th><input type="text" class="td shadowred"    id="t74"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t81" value="Июль"/></th>
    <th><input type="text" class="td shadowyellow" id="t82"/></th>
    <th><input type="text" class="td shadowblue"   id="t83"/></th>
    <th><input type="text" class="td shadowred"    id="t84"/></th>
</tr>
<tr>
    <th><input type="text" class="th2" id="t91" value="Август"/></th>
    <th><input type="text" class="td shadowyellow" id="t92"/></th>
    <th><input type="text" class="td shadowblue"   id="t93"/></th>
    <th><input type="text" class="td shadowred"    id="t94"/></th>
</tr>
<tr>
    <th align="left"><span class="th2">Среднее значение</span></th>
    <th></th>
    <th></th>
    <th></th>
</tr>
</table>
<br>
<table height = "30">
<tr>
    <td><input type="button" class="button" value="Lines" 
        onclick = "drawGraph(1)"/></td>
    <td><input type="button" class="button" value="Bars"  
        onclick = "drawGraph(2)"/></td>
    <td><input type="button" class="button" value="Dots"  
        onclick = "drawGraph(3)"/></td>
</tr>
</table>
<br>
<div id="placeholder" style="width: 600px; height: 300px;"></div>
</body>
</HTML>
style.css
CSS
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
#table
{
    cursor: pointer;
    -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Для Safari и Chrome */
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Параметры тени */
    border-collapse: collapse;
}
.th
{
    height: 30px;
    width: 100px;
    text-align: center;
    font-weight: bold;
}
.th2
{
    height: 30px;
    width: 150px;
    text-align: left;
    margin-left: 15px;
    font-weight: bold;
    text-shadow: black 1px 1px 2px, black 0 0 1em; /* Параметры тени */
}
.th2:hover
{
    color: grey;
}
.td
{
    height: 30px;
    width: 100px;
    text-align: center;
}
.th, .th2, .td
{
    border: 0px;
    cursor: pointer;
    color: white;
}
.shadowred
{
    text-shadow: black 1px 1px 2px, red 0 0 1em; /* Параметры тени */
}
.shadowred:hover
{
    color: red;
}
.shadowgreen
{
    text-shadow: black 1px 1px 2px, green 0 0 1em; /* Параметры тени */
}
.shadowgreen:hover
{
    color: green;
}
.shadowblue
{
    text-shadow: black 1px 1px 2px, blue 0 0 1em; /* Параметры тени */
}
.shadowblue:hover
{
    color: blue;
}
.shadowyellow
{
    text-shadow: black 1px 1px 2px, yellow 0 0 1em; /* Параметры тени */
}
.shadowyellow:hover
{
    color: yellow;
}
.th2:hover, .shadowred:hover, .shadowgreen:hover, .shadowblue:hover, .shadowyellow:hover
{
    font-size: 102%;
    text-shadow: black 1px 1px 2px;
}
 
.button
{
    cursor: pointer;
    background: #5c5c5c;
    text-shadow: 0px 2px 0px rgba(0, 0, 0, 0.3);
    color: white;
    margin: 0px 17px 0px 0px; 
    //закругленные углы
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px; 
    //тень
    -webkit-box-shadow: 0px 6px 0px rgba(0, 0, 0, 0.8);
    -moz-box-shadow: 0px 6px 0px rgba(0, 0, 0, 0.8);
    box-shadow: 0px 6px 0px rgba(0, 0, 0, 0.8); 
    //градиент
    background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}
 
.button:hover
{
    margin-top: 2px;
    //тень
    -webkit-box-shadow: 0px 4px 0px rgba(0, 0, 0, 0.8);
    -moz-box-shadow: 0px 4px 0px rgba(0, 0, 0, 0.8);
    box-shadow: 0px 4px 0px rgba(0, 0, 0, 0.8); 
    //градиент
    background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
    background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
    background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
    background-image: -ms-linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
    background-image: linear-gradient(bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
}
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
16.11.2012, 05:36
Ответы с готовыми решениями:

Неправильное отображение сайта в Опере
Подскажите. Я написал сайт, в Мозиле и Хроме отображается нормально, все как положено. А от в Опере, один ужас, все разбросано, текст,...

Неправильное отображение rules="rows" в опере
Есть таблица: &lt;table cols=&quot;7&quot; width=&quot;100%&quot; border=&quot;1&quot; rules=&quot;rows&quot;&gt; В фаерфоксе и хроме отображается как надо, в опере почему-то ещё...

Неправильное отображение ширины таблицы
Помогите пожалуйста с неправильным отображением ширины таблицы на сайте netvirusu.net В Google Chrome отображается таблица правильно: ...

1
1 / 1 / 0
Регистрация: 13.09.2011
Сообщений: 19
20.11.2012, 14:51  [ТС]
up...
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
20.11.2012, 14:51
Помогаю со студенческими работами здесь

Неправильное отображение времени из таблицы в DbGrid-е
Привет! Столкнулся с проблемой: В базе данных, в ячейке находится время (12:12), но в программе в DBGrid время отображается (30.12.1899...

Неправильное отображение элементов массива
Здравствуйте! есть прога: #include &lt;iostream&gt; #include &lt;ctime&gt; #include &lt;cstdlib&gt; using namespace std; int main(){ int ...

Неправильное отображение элементов графического интерфейса
Доброго времени суток. Недавно начал изучать Java. Скачал пакет Eclips Luna со всем необходимым. Делаю первые шаги, но уже столкнулся с...

отображение в опере
Все никак не пойму, почему так отображается в опере... Гуглить бесполезно, так как не могу четко поставить вопрос:( Может гляните, в ие...

Отображение ссылок в Опере
В файле CSS прописан основной стиль для ссылки. Он отображается по умолчанию для всех ссылок. Пытаюсь прописать альтернативный стиль: ...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Новые блоги и статьи
Первый деплой
lagorue 16.01.2026
Не спеша развернул своё 1ое приложение в kubernetes. А дальше мне интересно создать 1фронтэнд приложения и 2 бэкэнд приложения развернуть 2 деплоя в кубере получится 2 сервиса и что-бы они. . .
Расчёт переходных процессов в цепи постоянного тока
igorrr37 16.01.2026
/ * Дана цепь постоянного тока с R, L, C, k(ключ), U, E, J. Программа составляет систему уравнений по 1 и 2 законам Кирхгофа, решает её и находит токи на L и напряжения на C в установ. режимах до и. . .
Восстановить юзерскрипты Greasemonkey из бэкапа браузера
damix 15.01.2026
Если восстановить из бэкапа профиль Firefox после переустановки винды, то список юзерскриптов в Greasemonkey будет пустым. Но восстановить их можно так. Для этого понадобится консольная утилита. . .
Изучаю kubernetes
lagorue 13.01.2026
А пригодятся-ли мне знания kubernetes в России?
Сукцессия микоризы: основная теория в виде двух уравнений.
anaschu 11.01.2026
https:/ / rutube. ru/ video/ 7a537f578d808e67a3c6fd818a44a5c4/
WordPad для Windows 11
Jel 10.01.2026
WordPad для Windows 11 — это приложение, которое восстанавливает классический текстовый редактор WordPad в операционной системе Windows 11. После того как Microsoft исключила WordPad из. . .
Classic Notepad for Windows 11
Jel 10.01.2026
Old Classic Notepad for Windows 11 Приложение для Windows 11, позволяющее пользователям вернуть классическую версию текстового редактора «Блокнот» из Windows 10. Программа предоставляет более. . .
Почему дизайн решает?
Neotwalker 09.01.2026
В современном мире, где конкуренция за внимание потребителя достигла пика, дизайн становится мощным инструментом для успеха бренда. Это не просто красивый внешний вид продукта или сайта — это. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru