General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
New to html and css. Needing help with background images.
Here is the complete script as I have it thus far (without paragraph tags and other info that I plan to later add):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<link rel="stylesheet" type="text/css"
href="two_guys.css">
<title>Two Guys Computer, Co.</title>
</head>
<body style="background-image: url(background_blue.jpg);">
<img style="width: 1080px; height: 1100px;" alt=""
class="center" src="background_two_guys.png"><br>
</body>
</html>
The styles sheet is as follows:
img.center { display: block; margin-left: auto; margin-right: auto; margin-top: 0px; margin-bottom: 0px;
}
I know that there is some piece that I am missing here. I have searched for a solution online but there is so much geedunk that I end up more confused rather than knowledgeable. That is to include what I have been reading on the W3C Schools site. I have found that some things just don't work, especially across browsers.
I would like to control every aspect of the background image through my stylesheet though this seems to be the only way that I can get the images to display even halfway properly. At the moment the background_blue.jpeg displays perfectly. The other image centers properly but it doesn't span the page fully from top to bottom. (Please realize that I am extremely new to this subject and that I appreciate enlightened discourse rather than what I have experienced on other forums.)