xtrm0 Posted June 10, 2012 at 10:38 PM Report Share #461850 Posted June 10, 2012 at 10:38 PM (edited) Boas, estou a fazer um eportefólio para a escola. Mas deparei-me com um problema que não consigo resolver. A barra do topo do meu site funciona normalmente no firefox, mas no chrome e no opera ela desloca-se alguns pixeis para baixo, causando um espaco vazio no topo da página. Como é que posso resolver o problema? Link: http://eportefolio.netii.net Edited June 10, 2012 at 10:38 PM by xtrm0 <Signature goes here> Link to comment Share on other sites More sharing options...
KTachyon Posted June 10, 2012 at 10:53 PM Report Share #461852 Posted June 10, 2012 at 10:53 PM Começo por perguntar: porque é que tens código que devia estar no head, dentro do body? “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
xtrm0 Posted June 10, 2012 at 11:14 PM Author Report Share #461855 Posted June 10, 2012 at 11:14 PM Que código? A parte do <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script> não posso tirar porque é o 000webhost que adiciona sempre que se faz o download da página. <Signature goes here> Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted June 10, 2012 at 11:27 PM Report Share #461858 Posted June 10, 2012 at 11:27 PM fecha a tag meta IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
xtrm0 Posted June 10, 2012 at 11:37 PM Author Report Share #461859 Posted June 10, 2012 at 11:37 PM Já está. Não se alterou nada. <Signature goes here> Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted June 10, 2012 at 11:53 PM Report Share #461861 Posted June 10, 2012 at 11:53 PM fiz copy-paste do teu site para uma ficheiro (assim como os css's) e aparece bem ... acho que tens problemas com o servidor ... IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
KTachyon Posted June 11, 2012 at 12:24 AM Report Share #461865 Posted June 11, 2012 at 12:24 AM Em 6/11/2012 às 00:14, xtrm0 disse: Que código? A parte do <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script> não posso tirar porque é o 000webhost que adiciona sempre que se faz o download da página. Não era bem isso. Eu abri no inspector e parece que o meta, title e links estão no body, em vez de no head, mas no código fonte está tudo bem. Em 6/11/2012 às 00:53, HappyHippyHippo disse: fiz copy-paste do teu site para uma ficheiro (assim como os css's) e aparece bem ... acho que tens problemas com o servidor ... Isso não faz muito sentido. Se o código que chega ao browser é o mesmo, a página deve ser apresentada da mesma forma. A chamada ao script do Hosting24 deve ser feita dentro do html para ser válido. O doctype é case sensitive, logo deveria ser DOCTYPE. Penso que nenhum destes problemas será a causa, mas depois de resolveres isso logo se dará uma nova vista de olhos. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted June 11, 2012 at 07:43 AM Report Share #461879 Posted June 11, 2012 at 07:43 AM Isso não faz muito sentido. Se o código que chega ao browser é o mesmo, a página deve ser apresentada da mesma forma. Fazer sentido não faz, mas a verdade é que a cópia aparece correctamente no meu chrome ... IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
brunoais Posted June 11, 2012 at 08:38 AM Report Share #461890 Posted June 11, 2012 at 08:38 AM Bem... conseguiste por, de alguma forma, o validador incapaz de corretamente verificar a página. http://validator.w3.org/check?uri=http%3A%2F%2Feportefolio.netii.net%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&verbose=1 de tal maneira que: Cannot recover after last error. Any further errors will be ignored. "[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%. Link to comment Share on other sites More sharing options...
KTachyon Posted June 11, 2012 at 08:56 AM Report Share #461898 Posted June 11, 2012 at 08:56 AM Bem... culpa o BOM 😛 Provavelmente gravaste com um editor que retirou o BOM e por isso é que terá funcionado correctamente. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
xtrm0 Posted June 11, 2012 at 05:52 PM Author Report Share #462033 Posted June 11, 2012 at 05:52 PM (edited) Já voltei a gravar tudo em UTF-8 com e sem BOM e a fazer o upload de tudo em modo binário e continua igual. Também testei sem fazer o upload, só no meu pc o html e funciona. Será que é um problema com o php? Eis o código da página principal: <?php include ('template/header.html'); ?> <div style="width:900px; margin:0 auto ;"> <table style="width:800px;"> <tr id=nomesdostrab> <td style="width:200px;"><a href="#" class=onbtn><p class=myic>Home</p></a></td> </tr> </table> </div> <div id="magicbox"> <article class=notepadhome> Bem vindo ao meu eportefólio da disciplina de Biologia e Geologia de 10º ano. <br/><br/> Sinta-se livre de explorar o site! <br/><br/> Se quiser pode copiar os meus trabalhos e utilizá-los na escola com o seu nome, desde que não os utilize com fins lucrativos! <br/><br/> Este site encontra-se melhorado para o <a href="http://www.mozilla.org/pt-PT/firefox/fx/">firefox 13.0</a>. Faça o download ou a sua experiência no site poderá não ser tão boa!<br/><br/> Porque não começar pela <a class=underline href="intro.php">introdução</a>? </article> </div> <?php include ('template/footer.html'); ?> e a template do header é: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>ePortefolio do Afonso Tinoco</title> <link href="css/reset.css" rel="stylesheet" type="text/css"/> <link href="css/main.css" rel="stylesheet" type="text/css"/> </head> <body> <nav> <ul id=nav> <li><a href="links.php">Contacto</a></li> <li><a href="trabalho1.php">Portefólio</a></li> <li><a href="intro.php">Introdução</a></li> <li><a href="index.php">Home</a></li> </ul> </nav> <div id="wrapper"> <header> <h6 id=titulo style="width:900px; margin: 0 auto;">ePortefolio de Afonso Tinoco</h6> </header> <table class="marge"> <tr> <td> <div> Que outros servidores gratuitos é que há +- parecidos ao 000webhost? (cpanel, 100GB de tráfego, php e sem anúncios)? Edited June 11, 2012 at 05:49 PM by xtrm0 <Signature goes here> Link to comment Share on other sites More sharing options...
KTachyon Posted June 11, 2012 at 05:53 PM Report Share #462034 Posted June 11, 2012 at 05:53 PM O validador continua a detectar UTF-8 BOM. Tens que gravar sem BOM. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
xtrm0 Posted June 11, 2012 at 06:04 PM Author Report Share #462036 Posted June 11, 2012 at 06:04 PM (edited) Já consegui modificar para funcionar. Obrigado pela ajuda. O site estava a adicionar estes caracteres "" no inicio da página quando adicionava a página. Retirei-os com o editor online deles e já está a funcionar em todos os browsers que eu queria. Edit1: Fiz agora o upload sem BOM e o site não adicionou os caractéres. Porque é que o BOM causa problemas? Para além disso existe alguma forma de fazer com que o interpretador de html dos browser ignore a parte que é enviada pelo 000webhost (que está no fim do ficheiro)? Edited June 11, 2012 at 06:05 PM by xtrm0 <Signature goes here> Link to comment Share on other sites More sharing options...
KTachyon Posted June 11, 2012 at 06:58 PM Report Share #462044 Posted June 11, 2012 at 06:58 PM (edited) Porque adiciona informação ao início do texto que depois é interpretada incorrectamente como um caracter UTF-8 pelo browser. Não sei se resulta, mas podes tentar colocar um início de comentário depois do fecho do html. Não valida, mas o browser deve ser capaz de interpretar correctamente. Claro está, que pode não ser em qualquer browser... Edited June 11, 2012 at 07:00 PM by KTachyon “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
xtrm0 Posted June 11, 2012 at 09:50 PM Author Report Share #462076 Posted June 11, 2012 at 09:50 PM Obrigado. O <!-- só funciona outra vez no firefox XD. Mas não faz mal, o script do 000 também não estava a causar nenhum problema. <Signature goes here> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now