...

View Full Version : body background



paperino00
08-10-2012, 10:21 AM
Hello, when I assign the background-image to body the image fill all the page but i would like to left two lateral white strips starting from the table border, do you know how can I do this?

here two image and the html code, how it appears and how I would like it to appear... thank you :)

http://i50.tinypic.com/167jz9h.png

http://i45.tinypic.com/24v07ea.png


<body style="background-image: url(bkg.jpg)">
<table
style="text-align: left; width: 900px; height: 113px; margin-left: auto; margin-right: auto;"
border="1" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;"><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<h2 style="text-align: center;">TITOLO</h2>
<br>
</body>

VIPStephan
08-10-2012, 12:04 PM
Assign a width of 900px to the body (and margin: auto).

Arbitrator
08-10-2012, 12:33 PM
do you know how can I do this?
<!doctype html>
<html lang="en-US">
<head>
<title>Demo</title>
<style>
/* Defaults */
* { margin: 0; padding: 0; }
section { display: block; }

/* Layout */
html { height: 100%; height: 100%; }
#layout { width: 900px; min-height: 100%; margin: 0 auto; }
#box { min-height: 113px; border: 3px ridge; }
section { margin-top: 2em; }

/* Typography */
h1 { text-align: center; text-transform: uppercase; font-size: 1.5em; }

/* Color Scheme */
html { background-color: white; color: black; }
#layout { background: lightgray url("bkg.jpg"); color: black; }
#box { border-color: silver; }
</style>
<!--[if lte IE 8]>
<script>
document.createElement("section"); /* WIE8 does not allow styling of the HTML5 section element without first creating it via JavaScript. */
</script>
<![endif]-->
</head>
<body>
<div id="layout">
<div id="box"></div>
<section>
<h1 lang="it">Titolo</h1>
</section>
</div>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum