General discussion

Locked

New to html and css. Needing help with background images.

By eladcire75 ·
Tags: Off Topic
I am new to html and css scripting. What I desire to do is to tag on image as a background image to cover the full full page, and another image on top (or to overlay the first one) so that I can have a little cleaner look and not worry with having sooooo much script in the html that confuses what I am looking at.

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.)

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

HTML not really showing up.

by eladcire75 In reply to New to html and css. Nee ...

I don't know what exactly happened but the html script didn't really show up. What I have actually done is just to edit the background photo to overlay the photos. I think that it looks fairly sexy. Anyway I am working on a conditional statement that will force IE9 to read my style sheet (external style sheet). I haven't like IE for a very long time, but I understand that lots of people still use that browser. Any suggestions to help out with it? This is the conditional statement that I have attempted to use, but have had no luck in getting this to work.


<!--[if IE ]>
<link href="iecss.css" rel="stylesheet" type="text/css">
<![endif]-->

IE takes me to my wits end trying to debug it. I would actually like to target all of the IE versions with one statement rather than to target each one. I don't plan on using too super much of the higher end script.

Back to After Hours Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums