gaitasman 0 Posted March 29, 2011 Report Share Posted March 29, 2011 Boas... Sou novo por estas andanças do CSS, tou com um de alinhamento. Então é o seguinte, estou a criar um menu com cantos arredondados e com sombra, isto está dividido em 3 imagens(canto esquerdo, meio,canto direito). O meio tem um repeat-x só que em vez de ficar corrido fica -canto equerdo -meio -canto direito o pretendido era isto -canto equerdo-meio-canto direito html <div id="menu"> <div id="menuleft"></div> <div id="menucontent"></div> <div id="menuright"></div> </div> CSS #menu{ width:610px; } #menuleft{ height:65px; background-repeat:no-repeat; background-image:url(../imagens/esquerda.png); } #menucontent{ background-image:url(../imagens/meioh.png); background-repeat: repeat-x; width:17px; height:65px; } #menuright{ background-image:url(../imagens/direita.png); background-repeat: no-repeat; width:17px; height:65px; } Obrigado Abraço Link to post Share on other sites
Lfscoutinho 2 Posted March 29, 2011 Report Share Posted March 29, 2011 Boas, Tens de adicionar a propriedade float: left; no #menuLeft, #menuContent e #menuRight Link to post Share on other sites
gaitasman 0 Posted March 29, 2011 Author Report Share Posted March 29, 2011 Obrigado imagina que agora que adiciono conteudo, como é que faço crescer de acordo com o conteudo? <div id="menu"> <div id="menuleft"></div> <div id="menucontent"> <ul> <li>Fotografia & Video</li> <li>Imagem & Som</li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </Ul> </div> <div id="menuright"></div> </div> Link to post Share on other sites
Lfscoutinho 2 Posted March 29, 2011 Report Share Posted March 29, 2011 Boas, Não podes definir a altura, o máximo que podes definir é a altura mínima (min-height: 69px;). Link to post Share on other sites
gaitasman 0 Posted March 29, 2011 Author Report Share Posted March 29, 2011 Já fiz isso, não fez nada o content não cresce consoante o conteudo #menuleft{ width:17px; height:65px; background-repeat:no-repeat; background-image:url(../imagens/esquerda.png); float:left; } #menucontent{ background-image:url(../imagens/meioh.png); background-repeat: repeat-x; width:17px; min-height:69px; float:left; } #menuright{ background-image:url(../imagens/direita.png); background-repeat: no-repeat; width:17px; min-height:65px; float:left; } #menucontent ul{ padding:0px; margin:0px; float:left; width: 100%; list-style:none; } #menucontent ul li { display: inline; } Link to post Share on other sites
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