Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--HTML-->
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="mystyle.css">
- <title>A minha pagina</title>
- <script>
- var textonome = "";
- var textoemail = "";
- var textomens = "";
- var validated;
- function ItsAllValid()
- {
- document.getElementById("info").innerHTML = "<div class=\"correto\">Obrigado por enviar a mensagem. Irei responder assim que possível.</div>";
- document.getElementById("formas").innerHTML = " <div class=\"messshow1\"><b>"+
- textonome+"</b><br><a href=\"" + textoemail+"\">"+
- textoemail+"</a><br><div class=\"messshow2\"><p>"+
- textomens+"</p></div></div>";
- }
- function validate()
- {
- textonome = document.getElementById("Nome").value;
- textoemail = document.getElementById("Email").value;
- textomens = document.getElementById("Mensagem").value;
- validated = true;
- if(!textonome)
- {
- document.getElementById("Nome").style.borderColor = "red";
- validated=false;
- }
- else
- document.getElementById("Nome").style.borderColor = "green";
- if(!textoemail)
- {
- document.getElementById("Email").style.borderColor = "red";
- validated=false;
- }
- else
- document.getElementById("Email").style.borderColor = "green";
- if(textomens === "")
- {
- document.getElementById("Mensagem").style.borderColor = "red";
- validated=false;
- }
- else
- document.getElementById("Mensagem").style.borderColor = "green";
- if(validated)
- ItsAllValid();
- else
- document.getElementById("info").innerHTML = "<div class=\"vazio\">Por favor, preencha todos os campos do formulário.</div>";
- }
- </script>
- </head>
- <body>
- <script>
- validate();
- </script>
- <div class="head1">
- <div class="center1 centermargin">
- <div class="text">
- <H1 class="head">Luis Pereira</H1>
- <H3>Homepage</H3>
- </div>
- </div>
- </div>
- <div class="main">
- <div class="centermargin center2">
- <ul id="menu" class="roundabout">
- <li><a href="#">Quem sou</a></li>
- <li> | </li>
- <li><a href="#">Contacte-me</a></li>
- <li> | </li>
- <li><a href="#">Links</a></li>
- </ul>
- <div class="text">
- <div class="right">
- <img src="https://s-media-cache-ak0.pinimg.com/236x/c0/28/3b/c0283b7a4d4e80af548f00a0563d8ad2.jpg" class="prof"></img>
- </div>
- <div class="left">
- <div><H2>Quem sou</H2></div>
- <div><b>Nome:</b> Luis Pereira</div>
- <div><b>Idade:</b> 19 anos</div>
- <div><b>Actividade:</b> estudanate</div>
- <div><b>Onde vivo:</b> Viseu</div>
- </div>
- <hr style="margin-top:20px">
- <div><H2>Contacte-me</H2></div>
- <div id="info"></div>
- <div id="formas">
- <fieldset>
- <legend>A sua mensagem</legend>
- <form>
- <div class="boxleft">Nome:</div>
- <div class="boxright"><input id="Nome" /></div>
- <div class="boxleft">Email:</div>
- <div class="boxright"><input id="Email"/></div>
- <div class="boxleft">Mensagem:</div>
- <div class="boxright"><input id="Mensagem" /></div>
- <div class="boxright"><input type="button" value="Enviar" onClick="validate()"/></div>
- </form>
- </fieldset>
- </div>
- <hr>
- <div><H2>Os meus links favoritos</H2></div>
- <ul>
- <li>A bola</li>
- <li>Record</li>
- <li>O Jogo</li>
- </ul>
- </div>
- </div>
- </div>
- <div class="bottom">
- <div class="bottomargin">
- <ul id="menu">
- <li><a href="#">Quem sou</a></li>
- <li>|</li>
- <li><a href="#">Contacte-me</a></li>
- <li>|</li>
- <li><a href="#">Links</a></li>
- </ul>
- </div>
- </div>
- </body>
- </html>
- <!--CSS-->
- body{
- margin:0;
- padding:0;
- }
- div.vazio{
- border-style:solid;
- padding:2px;
- border-width:2px;
- width:100%;
- border-color:red;
- color:red;
- background-color:#AA5555;
- }
- div.correto{
- border-style:solid;
- padding:2px;
- border-width:2px;
- width:100%;
- border-color:green;
- color:green;
- background-color:#55AA55;
- }
- h1,h2,h3,h4,h5,h6{
- padding:0;
- margin:0;
- }
- h1.head{
- padding-top:3%;
- }
- div{
- padding:1px;
- }
- div.head1{
- width:100%;
- height:20%;
- border-bottom-style:solid;
- border-color:#5555ff;
- background-color:#259ff8;
- padding:0;
- min-height:140px;
- padding-bottom: 2px;
- border-width:4px;
- }
- div.main{
- background-color:#DDDDDD;
- padding:0
- }
- div.centermargin{
- margin-left:10%;
- margin-right:10%;
- }
- div.center1{
- height:100%;
- background-color:#7cc5d7;
- border-bottom-style:solid;
- border-color:#5555ff;
- }
- div.center2{
- min-height:65%;
- background-color:#FFFFFF;
- }
- div.right{
- float:right;
- width:24%;
- heigth:15%;
- }
- div.left{
- width:75%;
- min-height:160px
- }
- div.text{
- margin-left:4%;
- margin-right:4%
- }
- div.boxleft{
- width:25%;
- float:left;
- }
- div.boxright{
- width:74%;
- float:right;
- }
- div.bottom{
- min-height:50px;
- background-color:#aaaaaa;
- }
- div.bottomargin{
- margin-left:11.5%;
- margin-right:11.5%;
- }
- img.prof{
- height:150px;
- width:150px;
- border:5px #000000 outset;
- }
- hr{
- height:1%;
- background-color:#5555ff;
- }
- input{
- width:100%;
- }
- ul#menu li {
- display:inline;
- }
- a{
- color: #FFFFFF;
- text-decoration:none;
- }
- ul.roundabout{
- width:250px;
- border:10px solid;
- border-radius: 2em;
- background-color: #5555ff;
- border-color: #5555ff;
- color: #FFFFFF;
- margin-bottom: 0px;
- margin-top: -22px;
- margin-left: 5%;
- }
- .messshow1{
- padding:20px;
- padding-top:10px;
- padding-bottom:10px;
- background-color:gray;
- border-radius:15px
- }
- .messshow2{
- border-radius:15px;
- padding:20px;
- padding-top:10px;
- padding-bottom:10px;
- background-color: white
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement