<style>
body {
background-image: url(../html_beg/images/pinktree.png);
background-repeat: no-repeat;
background-position: right top;
margin-right: 198px;
}
</style>
<body>
<h1>Hello World!</h1>
<p>Now the background image is only shown once, and it is also positioned away from the text.</p>
<p>I tried adding a right margin, but margins don't work in tables, so I had to use "padding-right: 198px" instead.</p>
<p>The "margin-right: 198px" works in the body element. See the next page.</p>
</body>
|
Hello World!
Now the background image is only shown once, and it is also positioned away from the text.
I tried adding a right margin, but margins don't work in tables, so I had to use "padding-right: 198px" instead.
The "margin-right: 198px" works in the body element. See the next page.
|