Can I get the html background image code please?
4 posters
Requesting a code for a HTML background.
Spottedleaf- Forumember
- Posts : 97
Reputation : 2
Language : english
- Post n°1
Requesting a code for a HTML background.
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Hi,
I've edited your topic title to include 'For a HTML background because our search engine works on topic titles only
I've edited your topic title to include 'For a HTML background because our search engine works on topic titles only
Ange Tuteur- Forumaster
- Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania
Hello Spottedleaf,
To add a background to a page you must style your HTML elements with CSS. For example :
Add the code below to Display > Colors > CSS stylesheet
Replace /myimage.gif by the URL of your image.
To add a background to a page you must style your HTML elements with CSS. For example :
Add the code below to Display > Colors > CSS stylesheet
- Code:
body { background:url(/myimage.gif) repeat }
Replace /myimage.gif by the URL of your image.
Spottedleaf- Forumember
- Posts : 97
Reputation : 2
Language : english
I added it but I don't see any changes.
Derri- Helper
- Posts : 8711
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom
Spottedleaf wrote:I added it but I don't see any changes.
You did replace /myimage.gif with your own image url, correct?
Spottedleaf- Forumember
- Posts : 97
Reputation : 2
Language : english
It worked but I wanted a code that goes in the html section. Not CSS.
Fierce Star- Forumember
- Posts : 110
Reputation : 17
Language : English
Location : United States
Try addingSpottedleaf wrote:It worked but I wanted a code that goes in the html section. Not CSS.
- Code:
style="background:url('/myimage.gif');"
Ange Tuteur- Forumaster
- Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania
Is this for an HTML page ? If so you'll have to create an inline stylesheet within your <head> tag.
Ex :
or you can write it in the <body> tag's style attribute :
Ex :
- Code:
<head>
 <style type="text/css">
  body { background:url(/myimage.gif) repeat }
 </style>
</head>
or you can write it in the <body> tag's style attribute :
- Code:
<body style="background:url(/myimage.gif) repeat;">
 <!-- CHILD ELEMENTS -->
</body>