Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Allenas klausimai

Parašė allenas.· 2011 Bir. 11 13:06:45
#1

Sveiki, pradėjau mokytis HTML programavimo ir susidūriau su klaida.

Atrodo: http://allenas.wu.lt/

CSC:


/* allenas koding */
 
body {
    background-image: url(images/bg.png);
	margin: 0;
    padding: 0;
	background-repeat: repeat-all;
	}
 
.content {
	width: 792px;
}	
 
.head {
	background-image: url(images/head.png);
	width: 900px;
	height: 119px;
	}
 
.nav {
	background-image: url(images/nav.png);
	width: 900px;
	height: 119px;
	background-repeat: no-repeat;
	background-position: center;
	padding-top: 183px;
	}
 
.new {
	background-image: url(images/new.png);
	width: 502px;
	height: 42px;
	float: left;
	background-repeat: no-repeat;
	}
 
.panel {
	background-image: url(images/panel.png);
	width: 265px;
	height: 42px;
	background-repeat: no-repeat;
	float: right;	
	}
 
.foot {
	background-image: url(images/foot.png);
	width: 900px;
	height: 66px;
	background-repeat: no-repeat;
	background-position: center;
	}
 
.rekl {
	background-image: url(images/rekl.gif);
	width: 900px;
	height: 100px;
	background-repeat: no-repeat;
	background-position: center;
	}
 
.shad {	
    background-image: url(images/shad.png);
	width: 502px;
	height: 76px;
	background-repeat: no-repeat;
	background-position: left;
	}
 
.pan_shad {
	background-image: url(images/pan_shad.png);
	width: 265px;
	height: 96px;
	background-repeat: no-repeat;
	background-position: right;
	}
 
.new_title {
	font-family: Myriad Pro;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	padding-top: 7px;
	}
 
.pan_title {
	font-family: Myriad Pro;
	font-size: 12px
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	color: #fff;
	}
 
.nav_text {
	font-family: Myriad Pro;
	font-size: 12px;
	text-align: center;
	text-transform: uppercase;
	color: #fff;
	}
 
.new_content {
    font-family: Myriad Pro, Arial;
	width: 500px;
	font-size: 12px;
	color: #c7c7c7;
	text-align: left;
	}
 
.clear { clear: both; }	


INDEX.HTML


<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GTA</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="bg">
<div align="center">
<div class="head">
<div class=content">
 
    <div class="nav"></div>
 
    <div class="new">
	    <div class="new_title">
		    Lorem ipsum naujiena numeris vienas
    </div>
	    </div>
 
	<div class="clear"></div>
 
	<div class="panel">
	    


Kaip viską sulyginti į vietas? Už pagalbą +11. :)

Redagavo allenas.· 2011 Bir. 11 13:06:08

Parašė AivarasZs· 2011 Bir. 11 17:06:30
#2


 
<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GTA</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
<div align="center">
<div class="head"></div>
<div class="nav"></div>
<div class="news">
<p>Lorem ipsum naujiena numeris vienas</p>
</div>
<div class="panel"></div>
	</div>
		</div>
 



 
body {
	background:url(http://allenas.wu.lt/images/bg.png);
	margin: 0;
    padding: 0;
	background-repeat: repeat-all;
	}
 
#wrap {
	width:900px;
	height:auto;
	margin:0 auto;
}
 
.head {
	background:url(http://allenas.wu.lt/images/head.png);
	width: 900px;
	height: 119px;
	}
 
.nav {
	background:url(http://allenas.wu.lt/images/nav.png);
	width: 847px;
	height: 64px;
	background-repeat: no-repeat;
	background-position: center;
	}
 
.news {
	background:url(http://allenas.wu.lt/images/new.png);
	width: 502px;
	height: 42px;
	float: left;
	background-repeat: no-repeat;
	margin-left:29px;
	}
 
.news p {
	font-family: Myriad Pro;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	padding-left:15px;
}
 
.panel {
	background:url(http://allenas.wu.lt/images/panel.png);
	width: 265px;
	height: 42px;
	background-repeat: no-repeat;
	float: right;
	margin-right:29px;
	}
 

Parašė zilvenas· 2011 Bir. 11 17:06:48
#3

AivarasZs parašė:

 
<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GTA</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
<div align="center">
<div class="head"></div>
<div class="nav"></div>
<div class="news">
<p>Lorem ipsum naujiena numeris vienas</p>
</div>
<div class="panel"></div>
	</div>
		</div>
 



 
body {
	background:url(<b>http://allenas.wu.lt</b>/images/bg.png);
	margin: 0;
    padding: 0;
	background-repeat: repeat-all;
	}
 
#wrap {
	width:900px;
	height:auto;
	margin:0 auto;
}
 
.head {
	background:url(http://allenas.wu.lt/images/head.png);
	width: 900px;
	height: 119px;
	}
 
.nav {
	background:url(http://allenas.wu.lt/images/nav.png);
	width: 847px;
	height: 64px;
	background-repeat: no-repeat;
	background-position: center;
	}
 
.news {
	background:url(http://allenas.wu.lt/images/new.png);
	width: 502px;
	height: 42px;
	float: left;
	background-repeat: no-repeat;
	margin-left:29px;
	}
 
.news p {
	font-family: Myriad Pro;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	padding-left:15px;
}
 
.panel {
	background:url(http://allenas.wu.lt/images/panel.png);
	width: 265px;
	height: 42px;
	background-repeat: no-repeat;
	float: right;
	margin-right:29px;
	}
 


Nebūtina taip rašyt,galima ir background:url(images/bg.png); ;)

Parašė AivarasZs· 2011 Bir. 11 19:06:34
#4

Thanon parašė:
AivarasZs parašė:

 
<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GTA</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
<div align="center">
<div class="head"></div>
<div class="nav"></div>
<div class="news">
<p>Lorem ipsum naujiena numeris vienas</p>
</div>
<div class="panel"></div>
	</div>
		</div>
 



 
body {
	background:url(http://allenas.wu.lt/images/bg.png);
	margin: 0;
    padding: 0;
	background-repeat: repeat-all;
	}
 
#wrap {
	width:900px;
	height:auto;
	margin:0 auto;
}
 
.head {
	background:url(http://allenas.wu.lt/images/head.png);
	width: 900px;
	height: 119px;
	}
 
.nav {
	background:url(http://allenas.wu.lt/images/nav.png);
	width: 847px;
	height: 64px;
	background-repeat: no-repeat;
	background-position: center;
	}
 
.news {
	background:url(http://allenas.wu.lt/images/new.png);
	width: 502px;
	height: 42px;
	float: left;
	background-repeat: no-repeat;
	margin-left:29px;
	}
 
.news p {
	font-family: Myriad Pro;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	padding-left:15px;
}
 
.panel {
	background:url(http://allenas.wu.lt/images/panel.png);
	width: 265px;
	height: 42px;
	background-repeat: no-repeat;
	float: right;
	margin-right:29px;
	}
 


Nebūtina taip rašyt,galima ir background:url(images/bg.png); ;)

Supranti aš tai tų paveikslėlių neturėjau tai naudojau tikslius adresus. ;) :)

Redagavo AivarasZs· 2011 Bir. 11 21:06:59

Parašė gakse· 2011 Bir. 11 19:06:40
#5

Klaida body {


	background:url(<b>http://allenas.wu.l<b>t</b>/i</b>mages/bg.png)
 

turi buti taip


body {
 
	background:url(http://allenas.wu.lt/images/bg.png);

Redagavo gakse· 2011 Bir. 11 19:06:41

Parašė AivarasZs· 2011 Bir. 11 19:06:36
#6

Dėkuj kad pataisiai ;)

Parašė allenas.· 2011 Lie. 3 15:07:35
#7

2. Kodėl parašius .css faile tarkime padding-bottom: 20px; man jis neina į apačią? O parašius padding: 20px; paveikslėlis eina į šoną tik.

.CSS failas:


/*allenas coding*/
 
body {
    background-image: url(images/bg.png);
	margin: 0px;
	padding: 0px;
}
 
.logo {
	background-image: url(images/logo.png);
	width: 400px;
	height: 200px;
	background-repeat: no-repeat;
	padding-top: 70px;
}
 


.HTML failas:


<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Allenas design @ Counter strike</title>
<link href="stiliai.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div align="center">
	<div class="logo"></div>
</body>	

Parašė Faitas.· 2011 Lie. 3 15:07:20
#8

Ach, kada žmonės supras, kad HTML nėra programavimo kalba... Gėda... c|

HTML kodas netvarkingas, jei jau pradedi div'ą tai jį reikia ir dabaigti...


 <div align="center">
 
	<div class="logo"></div>


Čia matai kur nors, kur yra div'o center pabaiga? :D

Parašė allenas.· 2011 Lie. 4 15:07:38
#9

3. Kaip viską sucentruoti, kad nebūtų kaip: http://allenas.eu/lala/

.CSS failas:


/*allenas coding*/
 
body {
    background-image: url(images/bg.png);
	padding: 0px;
	margin: 0px;
}
 
.linija { 
	background-image: url(images/line.png);
	width: 857px;
	height: 6px;
}
 
.sviesa {
	background-image: url(images/light.png);
	width: 850px;
	height: 50px;
	background-repeat: no-repeat;
}
 
.logo {
    background-image: url(images/logo.png);
	width: 202px;
	height: 67px;
	background-repeat: no-repeat;
}
 
.naujiena {
    background-image: url(images/naujiena.png);
	width: 591px;
	height: 228px;
	background-repeat: no-repeat;
}
 
.footer {
	font-family: Tahoma, Verdana, Arial;
	font-size: 11px;
	color: #838383;
    text-align: center;
}


.HTML failas:


<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUVisos teisės saugomos © allenas.euBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Allenas design @ Kodavimo tikslai</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div align="center"></div>
	<div class="linija"></div>
	<div class="sviesa"></div>
	<div class="logo"></div>
	    <div class="naujiena"></div>
    <div class="footer">Visos teises saugomos © allenas.eu<br>
Dizainas sukurtas kodavimo mokymosi tikslais </div>
 
</body>

Parašė WantedBoy· 2011 Lie. 4 15:07:18
#10

.css faile dadek po kiekvienu
margin-left: auto;
margin-right: auto
kur nori, kad butu center'yje ;)

Parašė allenas.· 2011 Lie. 4 15:07:35
#11

Ačiū, padėjo. +11 tau. ;)