Страница 1 из 1

Помогите с кодом страницы

Добавлено: Пн мар 25, 2013 9:16 pm
adzam
Кто подскажет где ошибка в кодах, при загрузке показывает так
2.JPG
2.JPG (180.34 КБ) 4193 просмотра
если полистать страницы и вернуться то уже так
почему-то появляется полоса прокрутки и все разваливается
1.JPG
1.JPG (172.56 КБ) 4193 просмотра
код такой

<div class="ui-corner-all ui-state-default" style="float:left;margin-right:3px">
<div style="padding:5px" align="left">
<img src="http://abclocal.go.com/three/wabc/webcam/skycpk.jpg" height="240" width="300">
</div>
</div>




<div class="ui-corner-all ui-state-default" style="float:right;margin-right:3px">
<div style="width:299px;height:250px;float:right;background-color:#DFEFFC;overflow: hidden">
<div style="margin:1px;height:120px" >Температура на улице<div style="position:relative;top:12px;left:1px">



<script language="javascript">
if(%Chisinau.Temp%<=0){
document.write('<img src="/images/weather/termsin.png">');
}else{
document.write('<img src="/images/weather/termcra.png">');
}
</script></div>


<div style="font-size:38pt;font-weight:600;float:right;position:relative;top:-38px;right:50px">
<script language="javascript">
if(%Chisinau.Temp%<=0){
document.write('<span style="color:orange">');
}else{
document.write('<span style="color:green" >');
}
</script>%Chisinau.Temp%°C</span>
</div>
</div>



<div style="margin:5px;height:100px">Ветер<div style="position:relative;top:20px;left:20px">
<img src="/images/weather/wind.png"></div>
<div style="float:left;position:relative;top:-38px;left:120px">
<div style="font-size:10pt;font-weight:600;color: #251dc6;">%Chisinau.wind_direction%<br>
%Chisinau.image%<br>%Chisinau.weather%<br>%Chisinau.wind_speed%м/сек</div>
</div></div></div>

<div style="width:275px;height:250px;float:right;background-color:#DFEFFC;overflow: hidden">
<div style="margin:1px">Прогноз</div>
<div id="forecast"><span style="font-size: 0.9em;float:right"></span>
<div style="position:relative;top:-20px">

<img src="/images/weather/%Chisinau.image%%Chisinau.weather%.png" height="206" width="320">

</div>
</div>
</div>
</div>


<div class="clear" style="
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0px;
height: 0px">
</div>

<div style="margin:3px"></div>

<div style="margin:3px;background-color:#DFEFFC;border: 1px solid ;color:rgb(204, 204, 204);border-radius: 0.6em 0.6em 0.6em 0.6em;height:55px">
<div style="position:relative;top:1px;width:259px;left:10px">
<img src="/images/weather/Восход2.ico"></img>
<div style="margin:5px;float:right;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px" >Восход солнца&nbsp :&nbsp&nbsp %Chisinau.SunRise% </div>
<div style="float:right;position:relative;top:-18px;right:5px;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px">Заход солнца&nbsp :&nbsp&nbsp %Chisinau.SunSet%</div>
</div>
<div style="position:relative;top:-43px;width:259px;left:330px">
<img src="/images/weather/Вослун1.ico"></img>
<div style="position:relative;margin:5px;top:-50px;float:right;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px">
Восход луны&nbsp :&nbsp&nbsp %Chisinau.moonrise%</div>
<div style="position:relative;top:-47px;left:16px;width:150px;float:right;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px">Заход луны&nbsp:&nbsp&nbsp %Chisinau.moonset%</div>
</div>
<div style="position:relative;top:-90px;width:230px;left:650px">
<img src="/images/weather/%Chisinau.moon_phase%.ico"></img>
<div style="position:relative;margin:5px;top:-54px;float:right;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px">
Фаза луны : %Chisinau.moon_phase%%</div>
<div style="position:relative;top:-54px;left:38px;width:150px;float:right;font-weight: bold;color: rgb(46, 110, 158);font-size:10pt;height:15px">Растущая</div>
</div>
</div>

<div class="clear" style="
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0px;
height: 0px">
</div>

<div style="margin:3px"></div>

<div class="grid_6" style="margin:1px;position:relative;width:300px;height:150px;top:-129px">
<div class="ui-widget-content ui-corner-all ab-graph"style="padding: 5px">
<div style="padding: 5px;font-weight: bold;color: #251dc6;font-size:10pt">
Сегодня именины у:
<br>
<br><b><span id="C";style="color:green;font-size:11pt" >%task_title179% </span></b>
<br><br>Ближайший семейные праздники:
<br><br>
<span style="color:green;font-size:11pt" >21.06 - Люсьена (День рождения) (89 дн., исполняется лет: 36)
<br>16.07 - Милослава (День рождения) (114 дн., исполняется лет: 12)
<br>04.09 - Ануфрий (День рождения) (164 дн., исполняется лет: 40)</span></b>
<br>
</div>
</div>
</div>


<div class="ui-corner-all ui-state-default" style="float:left;margin-right:3px">


Код еще сырой только учусь строить страницы, уж не обессудьте

Re: Помогите с кодом страницы

Добавлено: Вт мар 26, 2013 10:19 am
dmw
Попробуйте чуть уменьшить ширину контейнера с погодой.
Там оформление создается фреймворком 960 Grid System, т.е. страница разбивается на сетку.
Размеры всех контейнеров описаны в файле: [папка сайта ab-log]/css2/960.css
Конкретно правый верхний погодный описывается 127 строчкой в файле 960.css:

Код: Выделить всё

.container_12 .grid_8 {
  width: 620px;
}