Jump to content

Screen fit background Image.


Recommended Posts

A background-image can't stretch so most people make one wide enough for most resolutions with top center an dthen code the background-color the same as the edges of the image so that it just continues the same color.


You can make a normal image stretch using position: absolute or position: fixed with width: 100%. left: 0; right: 0; which ties it to both sides. If you don't state a height this will adjust in proportion to the width, but in a narrow high window you will see a space below the image. See this example and drag th ewindow wider and narrower:-


Link to comment
Share on other sites

I would tend to agree...although as a designer and user of the internet on a slower connection, you should remember that large images as backgrounds are passe and should be avoided to reduce load lags....just saying....


[spam Link Deleted]

Edited by Andrea
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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