Kód: Vybrať všetko
<ul>
<li>text text text</li>
<li>text text text</li>
</ul>
Kód: Vybrať všetko
<ul>
<li>text text text</li>
<li>text text text</li>
</ul>
Kód: Vybrať všetko
<ul>
<li style="margin-left:-20px;">text text text</li>
<li>text text text</li>
</ul>
potrebujem aby som mal text, ktory bude v bunke tabulky a text, kory bude v <li> v <ul> v bunke, aby boli vlavo zaronvno, aby tam nebol odsek, ten margin a padding som skusal nejak mi to neslo, mozno som mal nekde chybu. Pozrem displaychrono napísal:Čo vlastne potrebuješ dosiahnuť? Lebo možno budeš musieť zmeniť margin, padding alebo display na inline (a možno niečo úplne iné).
jo a aby som nezabudol to co si pouzil je styl, ci mas pocit ze to funguje len ked je to v hlavicke?atlox napísal:No da sa to cez štýly trocha obíjsť:
skus a uvidiš ako bude ten horny vyzeraťKód: Vybrať všetko
<ul> <li style="margin-left:-20px;">text text text</li> <li>text text text</li> </ul>
Kód: Vybrať všetko
<tr> <td>Predmet:</td> <td><select name="predmet">
<option value="predmet"> </option>
<option value="predmet1">jeden</option>
<option value="predmet2">dva</option>
<option value="predmet3">tri</option>
<option value="predmet4">styri</option>
</select></td></tr>
<tr> <td colspan="2"><textarea rows="6" cols="40" name="text"></textarea></td></tr>
Kód: Vybrať všetko
function printText() {
select = document.getElementByName("predmet");
textValue = document.getElementByName("text").value;
switch (select.options[select.selectedIndex].value) {
case "predmet" : textValue = "dobry text";
case "predmet1" : textValue = "dobry text 2";
...
}
return;
}Kód: Vybrať všetko
<select name="predmet" onchange="printText()">
Kód: Vybrať všetko
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css">
<script>function printText() {
select = document.getElementByName("predmet");
textValue = document.getElementByName("text").value;
switch (select.options[select.selectedIndex].value) {
case "predmet" : textValue = "dobry text0";
case "predmet1" : textValue = "dobry text1";
case "predmet2" : textValue = "dobry text2";
case "predmet3" : textValue = "dobry text3";
}
return;
}
</script>
</head>
<body>
<table>
<tr> <td>Predmet správy:</td> <td><select name="predmet" onchange="printText()">
<option value="predmet"> </option>
<option value="predmet1">predmet1</option>
<option value="predmet2">predmet2</option>
<option value="predmet3">predmet3</option>
</select></td></tr>
<tr> <td colspan="2"><textarea size="10" rows="6" cols="40" name="text"></textarea></td></tr>
</table>
</body>
</html>
Kód: Vybrať všetko
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
<link href="style.css" rel="stylesheet" type="text/css">
<script>
function printText() {
select = document.getElementById("predmet");
switch (select.options[select.selectedIndex].value) {
case "predmet" :
document.getElementById("text").innerHTML = "dobry text0";
break;
case "predmet1" :
document.getElementById("text").innerHTML = "dobry text1";
break;
case "predmet2" :
document.getElementById("text").innerHTML = "dobry text2";
break;
case "predmet3" :
document.getElementById("text").innerHTML = "dobry text3";
break;
}
return;
}
</script>
</head>
<body>
<table>
<tr> <td>Predmet správy:</td> <td><select id="predmet" onChange="printText()">
<option value="predmet">predmet</option>
<option value="predmet1">predmet1</option>
<option value="predmet2">predmet2</option>
<option value="predmet3">predmet3</option>
</select></td></tr>
<tr><td colspan="2">
<textarea size="10" rows="6" cols="40" name="text" id="text"></textarea>
</td></tr>
</table>
</body>
</html>
Kód: Vybrať všetko
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript">
function printText() {
var select = document.forms["formular"]["predmet"];
var text = document.forms["formular"]["text"];
switch (select.options[select.selectedIndex].value) {
case "predmet" : text.value = "dobry text0";
break;
case "predmet1" : text.value = "dobry text1";
break;
case "predmet2" : text.value = "dobry text2";
break;
case "predmet3" : text.value = "dobry text3";
break;
default : text.value = "nic";
}
return;
}
</script>
</head>
<body>
<form name="formular" method="post" action="">
<table>
<tr> <td>Predmet správy:</td> <td>
<select name="predmet" onChange="printText();">
<option value="predmet1"> </option>
<option value="predmet2">predmet1</option>
<option value="predmet3">predmet2</option>
<option value="predmet4">predmet3</option>
</select></td></tr>
<tr> <td colspan="2"><textarea size="10" rows="6" cols="40" name="text"></textarea></td></tr>
</table>
</form>
</body>
</html>
Kód: Vybrať všetko
...
case "predmet1" : text.value = "dobry <br> text";
break;
...
Kód: Vybrať všetko
<?php
$meno=$_POST["meno"];
$email=$_POST["e-mail"];
$predmet=$_POST["predmet"];
$sprava=$_POST["text"];
$end="Odoslané z kontaktného formuláru na www.dobrytext.net";
$to = "[email protected]";
$extra = "From: $email\nReply-To:$email\n";
$subject = "Správa od ".$meno;
$mess = "Meno: ".$meno."\nEmail: ".$email."\nPredmet: ".$predmet."\nSpráva:\n".$sprava. "\n\n\n\n".$end;
mail ($to, $subject, $mess, $extra);
if($predmet="predmet0")
echo "Správa nebola odoslaná. Zvoľte si prosím predmet.";
if(mail)
echo "Správa bola úspešne odoslaná. Ďakujeme Vám za Váš e-mail.";
?> Kód: Vybrať všetko
<?php
$meno=$_POST["meno"];
$email=$_POST["e-mail"];
$predmet=$_POST["predmet"];
$sprava=$_POST["text"];
$end="Odoslané z kontaktného formuláru na www.dobrytext.net";
$to = "[email protected]";
$extra = "From: $email\nReply-To:$email\n";
$subject = "Správa od ".$meno;
$mess = "Meno: ".$meno."\nEmail: ".$email."\nPredmet: ".$predmet."\nSpráva:\n".$sprava. "\n\n\n\n".$end;
if($predmet="predmet0") echo "Správa nebola odoslaná. Zvoľte si prosím predmet.";
elseif(mail ($to, $subject, $mess, $extra)) echo "Správa bola úspešne odoslaná. Ďakujeme Vám za Váš e-mail.";
else echo "Odoslanie spravy zlyhalo.";
?> Kód: Vybrať všetko
<textarea onfocus="this.value='';"></textarea>