html - Resizing a background image, as it's too big for the browser -
so i'm designing web page incomplete atm, it's missing 2 buttons simple. instead of messing around divs , css styling decided make background in photoshop. created image in resolution of 1920x1080, when apply image background doesn't fit browser window bottom right corner missing. there code can add fix issue or best option recreating image @ smaller resolution , if so, resolution should build for?
here link page in case didn't explain enough: http://www.itss.brockport.edu/~rsiss1/cis442/bulletinboard/bulletinboard
here code:
<?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"> <head> <title>bulletinboard</title> <style> body {background: url(bulletinboardbg.jpg); background-position: center no-repeat;} </style> </head> <body> </body> </html>
try css property
background-size: cover;
there's background-size: contain
if must have entire image on screen , don't mind space around edges.
Comments
Post a Comment