Jump to content
sEnte

imagem em background

Recommended Posts

sEnte

Boa noite pessoal.

Eu estou a tentar meter uma imagem a servir como background de um site, no entanto estou a ter alguns problemas.

Este é o código que estou a usar.

body {
		background-image: url("images/overlay.jpg");
		background-attachment: fixed, fixed;
		background-position: top center;
		background-repeat: none, none;
		background-size: cover, 100%;
	}

Desta maneira mostra desde o topo mas corta parte da parte inferior da imagem.

 

já experimentei

body {
		background-image: url("images/overlay.jpg");
		background-attachment: fixed, fixed;
		background-position: fixed;
		background-repeat: none, none;
		background-size: contain;
	}

Isto faz com que a altura da imagem fique perfeita mas em largura fica duplicada.

 

Como é que posso resolver isto?


"If It Ain't Broke, Break it and build something Cooler!" Unknown

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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