Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

fpinto

alinhar ao chao

Recommended Posts

fpinto

boas, fiz um pequeno site. este e o index:

<!DOCTYPE html 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> bem vindo </title>
<style type="text/css">
.style1 {
font-size: large;
}
.style2 {
font-size: small;
}
.style3 {
text-align: left;
}
.style4 {
font-size: small;
text-align: left;
}
</style>
</head>
<body>
<p>bem vindo</p>
<p/>
<ul>
<li style= class="style1"><a href = "img.htm"><span class="style1">cool screensavers</span></a><p></p></li>
<li style= class="style1"><a href = "ftp://192.168.0.10">ftp</a> ( under construction, internal only )<p/></li>
<li> <a href="jogos.htm"> list of games</a></li>  ( under construction )
</ul>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<hr/>
<div class="style4">
personal web site. learning purposes only
</div>
<p class="style4">web site created by: fpinto</p>
<div class="style3">
<span class="style2">if you have any question or suggestion email.me </span> <a href = "mailto:fernandoandrepinto@hotmai.com">
<span class="style2">here</span></a></div>
<p/>
<br />
</body>

</html>

da para alinhar a parte depois do <hr/> de forma a estar sempre no fundo?[/code]

Share this post


Link to post
Share on other sites
gambas

tudo o que tens depois do <hr /> mete dentro de um div, da-lhe o id de 'bottom' (por exemplo)... e depois no css metes o seguinte:

body {
height:100%;
margin:0;
padding:0;
}
#bottom {
position:fixed;
bottom:0;
right:0;
width:100%;
background-color:#efefef;
z-index:1;
}

testei no firefox 3.5 e IE8... deu perfeitamente mas como nao sou expert em CSS nao sei! mas exprimenta

Share this post


Link to post
Share on other sites
sergio3861

Viva.

Olha aproveitei e verifiquei se tinhas código válido, tinhas alguns erros e coloco aqui a correcção. Experimenta.

<!DOCTYPE html 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> bem vindo </title>
<style type="text/css">
.style1 {
        font-size: large;
}
.style2 {
        font-size: small;
}
.style3 {
        text-align: left;
}
.style4 {
        font-size: small;
        text-align: left;
}

body {
        height:100%;
        margin:0;
        padding:0;
}
#bottom {
        position:fixed;
        bottom:0;
        right:0;
        width:100%;
        background-color:#efefef;
        z-index:1;
}
</style>
</head>
<body>
<p>bem vindo</p>
<p/>
<ul>
<li class="style1"><a href = "img.htm"><span class="style1">cool screensavers</span></a><p></p></li>
<li class="style1"><a href = "ftp://192.168.0.10">ftp</a> ( under construction, internal only )<p/></li>
<li> <a href="jogos.htm"> list of games</a> ( under construction ) </li> 
</ul>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<hr/>
<div class="bottom">
    <div class="style4">
    personal web site. learning purposes only
    </div>
    <p class="style4">web site created by: fpinto</p>
    <div class="style3">
            <span class="style2">if you have any question or suggestion email.me </span> <a href = "mailto:fernandoandrepinto@hotmai.com">
            <span class="style2">here</span></a></div>
    <p/>
    <br />
</div>

</body>

</html>

Abraço


Na Web nada se cria tudo se copia... Mas muito ainda podemos inovar...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.