Ech, pisałem wcześniej temat z problemem i nikt nie odpowiedział. Dotyczył on tego, że jak dałem w <section id="opis> parę linijek tekstu to <section id="opis1">
przesuwał się do dołu. Gdy było, np. 7 linijek, usunąłem 5 to wszystko na stronie było już nie w swoim miejscu.
Pomyślałem, że wczytanie pliku do DIV'a jakoś pomoże, pozamieniałem <section> na DIV'y i nadal jest ten sam problem.
HTML
<nav id="nawigacja" class="anchor">
<div class="logo"><a href="index.php">Mazurski 1.0
</a></div> <div class="menu"><a href="">Serwer
</a> <a id="rejestracja">Rejestracja
</a> <a href="">Forum
</a> <p5><?php print (''.$_SERVER['REMOTE_ADDR'].''); ?></p5>
<div class="jezyk"><a href="en/index.php"> </a></div> </nav>
<? include 'config.php';?>
<?php
$ilosc = count(glob("$diraccount/*.*"));
$ilosc_monsters = count(glob("$dirmonsters/*.*"));
?>
<div style="position: relative; top: -10px;"> <b>IP:
<?=$ip_serwera?><br> PORT:
<?=$port_serwera?></b><br>Istniejących kont:
<?=$ilosc;?><br>Ilość potworów:
<?=$ilosc_monsters;?><br>
<?php
$info = chr(6).chr(0).chr(255).chr(255).'info';
$sock = @fsockopen($ip_serwera, $port_serwera, $errno, $errstr, 1);
if ($sock)
{
fwrite($sock, $info);
$data='';
while (!feof($sock))
$data .= fgets($sock, 1024);
fclose($sock);
print '<div style="position: relative; top: -23px; font-size: 13; font-weight: bold; color: darkgreen"><br><font color="green">ONLINE!
</font></div>';
preg_match('/players online="(\d+)" max="(\d+)" peak="(\d+)"/', $data, $matches);
print '
<div style="position: relative; top: -25px; font-size: 11; font-weight: normal; color: #000000"><font face="verdana"><strong>Graczy:
</strong></font> ';
print $matches[1] . '/' . $matches[2];
preg_match('/uptime="(\d+)"/', $data, $matches);
$h = floor($matches[1] / 3600);
$m = floor(($matches[1] - $h*3600) / 60);
print "
<br><strong>Uptime:
</strong> $h " . ($h==1? 'godzina' : ($h==2||$h==3||$h==4? 'godziny' : 'godzin'));
print " $m " . ($m==1? 'minuta' : ($m==12||$m==13||$m==14? 'minut' : ($m%10==2||$m%10==3||$m%10==4? 'minuty' : 'minut'))) . '
</div>';
}
else
print '
<div style="position: relative; top: -23px;font-size: 13; font-weight: bold; color: red"><br>OFF!
</div>';
<header class="anchor">
<div class="content-top">
<div class="content-bot">
<script type="text/javascript" src="slideshow.js?v42"></script>
<script type="text/javascript" src="/wow/static/local-common/js/third-party/swfobject.js?v42"></script>
<div id="slideshow" class="ui-slideshow">
<div class="slide" id="slide-0"
style="background-image: url(images/1.png); ">
<div class="slide" id="slide-1"
style="background-image: url(images/2.png); display: none;">
<div class="slide" id="slide-2"
style="background-image: url(images/3.png); display: none;">
<div class="slide" id="slide-3"
style="background-image: url('images/4.png'); display: none;">
<div class="slide" id="slide-4"
style="background-image: url('images/5.png'); display: none;">
<a href="java script:;" id="paging-0"
onclick="Slideshow.jump(0, this);"
onmouseover="Slideshow.preview(0);"
class="current">
<a href="java script:;" id="paging-1"
onclick="Slideshow.jump(1, this);"
onmouseover="Slideshow.preview(1);"
>
<a href="java script:;" id="paging-2"
onclick="Slideshow.jump(2, this);"
onmouseover="Slideshow.preview(2);"
>
<a href="java script:;" id="paging-3"
onclick="Slideshow.jump(3, this);"
onmouseover="Slideshow.preview(3);"
>
<a href="java script:;" id="paging-4"
onclick="Slideshow.jump(4, this);"
onmouseover="Slideshow.preview(4);"
class=" last-slide">
<h3><a href="#" class="link"></a></h3>
<script type="text/javascript">
//<![CDATA[
$(function() {
Slideshow.initialize('#slideshow', [
{
image: "images/1.png",
title: "Interesujące miejsca!",
url: "",
id: "5469718"
},
{
image: "images/2.png",
title: "Ciekawe zadania!",
url: "",
id: "5469724"
},
{
image: "images/3.png",
title: "Niezliczone nagrody!",
url: "",
id: "5543230"
},
{
image: "4.png",
title: "Areny gladiatorów!",
url: "",
id: "5490809"
},
{
image: "5.png",
title: "Ogromne piekła z wieloma tajemnicami!",
url: "",
id: "5338753"
}
]);
});
//]]>
</header>
<header>
$('#rejestracja').click(function() {
$('.header1').load('acc.php');
});
<div class="header1">to teskt jest od razu widoczny po wejsciu na strone
</div> </header>
CSS:
body{
margin: 0;
font-family: Helvetica;
font-size: 13px;
color:#8b8b8b;
background-color:#f1f0ef;
}
#nawigacja {
background: url("images/menu.png");
border-style:none;
width:100%;
height:54px;
position: absolute;
top:0px;
z-index: 10;
}
background: #ffffff;
min-height: 317px;
margin-top: 150px;
}
#rejestracja {
min-height:1000px;
}
#forum {
height:600px;
background: #e8e8e9;
text-align: center;
}
.news {
width: 600px;
height: auto;
float: left;
margin-top: 50px;
margin-left: 480px;
top: -350px;
position: relative;
}
h1{
font-size: 16px;
}
strong{
color:#6ea031;
}
a{
color: #e8e8e9;
text-decoration:none;
}
a:active{
color: #fff;
text-decoration:none;
}
a:hover{
color: #fff;
text-decoration:none;
}
.container{
width: 900px;
z-index: 0;
margin: 0 auto 0 auto;
}
.logo {
margin-top: 20px;
text-align: left;
font-size: 15px;
}
.menu {
margin-top:-18px;
text-align: center;
font-size: 16px;
}
.jezyk {
margin-top: -15px;
text-align: right;
font-size: 11px;
}
#status {
background-color: #fff; height: 90px; width: 200px; float: right; top: -90px; position: relative; border-top-right-radius: 5px; border-top-left-radius: 5px; text-align: center; margin-right: 5px; -webkit-transition: all 1s ease;
}
#status:hover {
background: #fff 100% 0; height: 150px; width: 250px; float: right; top: -95px; position: relative; text-align: center; margin-right: 5px; border-radius: 5px; -webkit-transition: all 1s ease;
}
h2 {
position: relative;
top: -290px;
font-size: 16px;
}
input {border-radius: 5px;}
p3 {
color: #000000;
}
p4 {
position: relative;
top: -285px;
}
p5 {
position: relative;
color: #fff;
float: right;
right: -175px;
font-size: 9px;
top: -19px;
}
.galeria {
margin: 50px auto 0 auto;
width: 900px;
height: 252px;
background-color: #f2f2f2;
border-radius: 5px;
border: 7px solid rgba(0,0,0,.05);
background-clip: padding-box;
box-shadow: 0 0 2px rgba(0, 0, 0, .5);
position: relative;
top: 25px;
}
div.galeria1{
margin-left:290px;
margin-top: 22px;
margin-bottom: 28px;
overflow: hidden;
float: left;
}
div.galeria1 div{
width: 252px;
height: 252px;
text-align: center;
position: absolute;
margin-left: -255px;
}
div.galeria1 div.first {
z-index: 1;
}
div.praca{
margin-left: 600px;
margin-top: -240px;
margin-bottom: 28px;
float: left;
display: block;
}
div.praca div{
width: 252px;
height: 252px;
text-align: center;
position: absolute;
margin-left: -255px;
}
div.praca div.first {
z-index: 1;
}
Coś musi być nie tak z CSS, nie mam pojęcia co jest źle. Nie ma w ogóle tekstu w <div class="newsy"> to napis "to teskt jest od razu widoczny po wejsciu na strone" w <div class="header1"> jest w pierwszej linii.
Gdy dodam, np. 3 linijki tekstu w <div class="newsy"> to napis "to teskt jest od razu widoczny po wejsciu na strone" w <div class="header1"> przesuwa się do dołu... :/
Pomógłby ktoś uporać się z tym błędem?