Jump to content

Recommended Posts

Posted

Boas,

Tenho este codigo, mas ja nao trabalho ha mt tempo com HTML e estou com dificuldade em saber onde esta o erro:

<html>
<head>
	<title> Direitos Humanos | Human Rights </title>
</head>


<body>


	<div style="position:absolute; width:100%; height:100%; margin:0px; padding:0px; left:0px; top:0px; z-index:"0">
		<img src="multimedia/DH.jpg" width="100%" height="100%"/>
	</div>

	<table align=center>
		<tr>
			<td align=center><a href="intro.php"><img src="Multimedia/Portugal.jpg"></a></td>
			<td></td>
			<td align=center><a href="introe.php"><img src="Multimedia/English.jpg"></a></td>
		</tr>

		<tr>
			<td align=center><a href="intro.php">PORTUGUÊS</a></td>
			<td></td>
			<td align=center><a href="introe.php">ENGLISH</a></td>
		</tr>
	</table>

<div style="position:absolute; width:100%; height:0px; margin:0px; padding:0px; left:0px; top:80px; z-index:1">

<?PHP
include 'rodape.php';
?>

Obrigado,

DevilRocks92

Posted

Vejamos...

Assumindo HTML4 ou HTML5

[*]Não tem doctype

[*]Tem um div q possivelmente não fecha (se fecha, o ficheiro está mal feito)

[*]Usa tabelas para o layout

[*]Usas o atributo align

O outro problema é fácil de reparar, basta ver como o highlighter assinalou.

"[Os jovens da actual geração]não lêem porque não envolve um telecomando que dê para mirar e atirar, não falam porque a trapalhice é rainha e o calão é rei" autor: thoga31

Life is a genetically transmitted disease, induced by sex, with death rate of 100%.

Posted

Ja sei qual e o problema mas nao consigo resolver.

O problema é que a imagem vem para a frente e tapa o conteudo, sera que alguem me pode ajudar?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>

<title> Direitos Humanos | Human Rights </title>

<style type="text/css">
html, body 
{
	height: 100%;
	margin: 0;
	padding: 0;
}

img#bg 
{
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
}
</style>

</head>

<!---------------------------------------------------------------------------------------------------------->
<body>

<img src="Multimedia/DH.jpg" alt="background image" id="bg" />

	<table align=center>
		<tr>
			<td align=center><a href="intro.php"><img width="350" height="200" src="Multimedia/Portugal.jpg"></a></td>
			<td></td>
			<td align=center><a href="introe.php"><img width="350" height="200" src="Multimedia/English.jpg"></a></td>
		</tr>

		<tr>
			<td align=center><a href="intro.php">PORTUGUÊS</a></td>
			<td></td>
			<td align=center><a href="introe.php">ENGLISH</a></td>
		</tr>
	</table>


<div style="position:absolute; width:100%; height:0px; margin:0px; padding:0px; left:0px; top:100px; z-index:1">


<?PHP
include 'rodape.php';
?>
Posted

Olá. Eu sou um aprendiz muito iniciante ao lado da malta que por aqui anda, mas se puder ir pensando convosco...

Porque é que passaste o css para o <head> mas mantens o inline style? não preferes ou não podes separar tudo? Pelo que tenho visto por aqui se calhar o ideal até era passares para stylesheet.css à parte.

dá a impressão que não fechas o div style? e </body> ou </html>?

mesmo alguns dos parâmetros css que pões parecem confusos. [padding:0px; left:0px; top:100px;]

ou queres dizer:

padding-left: 0px;

padding-right: 0px;

Se usares só:

padding:0px; estás a aplicar aos 4 (left-top-right-bottom).

não preferes uma estrutura tipo: (não me caiam em cima pois estou a fazer de cor) :wallbash:

<DOCTTYPE html>
    

<head>
<title> bla bla </title>

<style type=text/css>

    body {
        margin: 0px;
        background-color:blue; /* ou background-image: 
        ...*/
        }

    #qualquer_coisa1 {
        background-color:yellow;
        width:50%;
        height:auto;
        margin:0px;
        padding:0px;
        float:left;
        }
    
    #qualquer_coisa2 {
        background-color:white;
        width:50%;
        height:auto;
        margin:0px;
        padding:0px;
        float:right;
                    }
    </style>

</head>
    
<body>
    
    <div id="qualquer_coisa1">
    <img src="Multimedia/DH.jpg" alt="background image" id="bg" />
    </div>
    
    <div id="qualquer_coisa2">
   <!---- /* as tables e img's que quiseres */----->
    
    <?php
    includes
    ?>
    </div>
    
</body>
    
</html>

"Que inquieto desejo vos tortura, Seres elementares, força obscura? Em volta de que ideia gravitais?" >> Anthero de Quental

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linuxando.com | ...

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
×
×
  • Create New...

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.