Drone Posted July 18, 2006 at 11:44 PM Report #38972 Posted July 18, 2006 at 11:44 PM Boas estou a fazer uma pagina simplesmente dom DIV's (estou a aprender a fazer) e tenho uma duvida que é a seguinte, eu no CSS (style.css) tenho isto: body { font:Verdana; font-size:10px; color:#CCCCCC; background-color:#333333; margin:0px; } #header { background-color: #CCCCCC; background-image:url(images/header.gif); background-repeat:repeat-x; height: 25px; } div.header-text { color:#333333; text-align:center; } e no HTML tenho isto: <div id="header" class="header-text">Login - Registar-se</div> Ok ta tudo a funcionar como deve de ser o unico problema é que o texto nao aparece com fonte Verdana nem com o tamanho 10px ! acho muito estranho, alguem sabe porque?
QuickFire Posted July 19, 2006 at 12:17 AM Report #38979 Posted July 19, 2006 at 12:17 AM Uma coisa que se ouve muito lá fora: KISS (Keep It Simple Stupid) 😛 Estas a usar uma class e um id sem necessidade 😁 Podes por tudo num só e poupar muitas linhas para chegares ao mesmo efeito 👍 body { font:10px Verdana; color:#CCCCCC; background-color:#333333; margin:0px; } div#header { color:#333333; text-align:center; background-color: #CCCCCC; background-image:url(images/header.gif); background-repeat:repeat-x; height: 25px; } <div id="header">Login - Registar-se</div>
Drone Posted July 19, 2006 at 12:47 AM Author Report #38984 Posted July 19, 2006 at 12:47 AM eu tinha assim com explicas-te e n deu dps separei pa ver se tinha alguma coisa a ver e nao funcionou na mesma, continua a font sem ser verdana e sem ser tamanho 10px! esse e q é o meu problema!
Triton Posted July 19, 2006 at 03:04 AM Report #38996 Posted July 19, 2006 at 03:04 AM Aqui funciona perfeitamente tanto em IE como em Firefox. Usei este código para testar: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <title>CSS Test</title> <meta http-equiv="Content-Type" content="application/xhtml+xml" /> <link rel="stylesheet" type="text/css" media="screen" href="main.css" /> </head> <body> <div id="header">Login - Registar-se</div> </body> </html> <3 life
Drone Posted July 19, 2006 at 08:39 AM Author Report #39001 Posted July 19, 2006 at 08:39 AM tks ja consegui por a bombar 🙂 EDIT: o header é uma div de 25 px, e o texto aparece no top da div eu gostava que aparecesse no meio, ha maneira de colocá-lo no meio ou tenho de utilizar o margin / padding ?
skin Posted July 19, 2006 at 09:35 AM Report #39015 Posted July 19, 2006 at 09:35 AM tipo das-lhe a instrução position=middle que ele deve ficar no meio. Não testei. Our lives begin to end the day we become silent about things that matter - Martin Luther King
Drone Posted July 19, 2006 at 12:34 PM Author Report #39044 Posted July 19, 2006 at 12:34 PM Não, isso nao funciona :\ to a utilizar o margin-top!
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