Marcelo Antonio_118277 0 Denunciar post Postado Julho 24, 2012 Como criar um topo, com menu e tal, onde, quando der um scroll na página ele a acompanhe???? um exemplo é o site do facebook Compartilhar este post Link para o post Compartilhar em outros sites
Marco Bruno 19 Denunciar post Postado Julho 24, 2012 Bom dia, Marcelo Antonio_118277. A parada é o position: fixed;, segue um exemplo abaixo: <!DOCTYPE html> <html> <head> <title>Topo Fixo</title> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; border: none; list-style: none; } body { color: #FFF;} header { width: 100%; min-width: 980px; height: 80px; border: 1px solid #333; background-color: red; position: fixed; top: 0; } article { min-width: 980px; height: 1200px; padding-top: 90px; background-color: blue; } footer { min-width: 980px; height: 180px; background-color: black; } </style> </head> <body> <header><h1>CSS Cabeçalho: position: fixed; top: 0; width: 100%;</h1></header> <article><h1>Conteúdo</h1></article> <footer><h1>Rodapé</h1></footer> </body> </html> Qualquer dúvida da um grito ae! Compartilhar este post Link para o post Compartilhar em outros sites
Willian Makoto 6 Denunciar post Postado Julho 24, 2012 desta forma não dá erro no IE7~8 ? Compartilhar este post Link para o post Compartilhar em outros sites
William Bruno 1501 Denunciar post Postado Julho 24, 2012 Para simular o "fixed" nos IEs antigos, você pode usar uma "gambiarra" com positions absolutes: http://forum.imasters.com.br/topic/252392-simulando-position-fixed-ff-ie-opera/ Compartilhar este post Link para o post Compartilhar em outros sites