The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> background doesnt show up
konqrr
post Sep 26 2006, 08:42 AM
Post #1





Group: Members
Posts: 2
Joined: 26-September 06
Member No.: 236



I cant get my background image to display and my project is due in like 2 days. Could someone help me out? Here is the code:

CODE
<hmtl>

    <head>
        <title>The Best Site for...</title>
        <style type="text/css">
            body {
                background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg');
                background-repeat: no-repeat;
                background-position: center;
            }
            img.leftmargin {
                    margin-left:px;
                    margin-top:px;
                }
            img.leftmargin2 {
                    margin-left:px;
                }
                              <!-- ok, so for "top"
                            margin value the greater
                            amount controls it. for ex.
                            the "0px" has no effect. so
                            only one top margin value
                            is needed. also,
                            for img2, the left margin controls
                            how far it is from the first pic,
                            not from the left of the browser...
                            unlike pic 1 where margin left
                            controls how far it is from the
                            left of the browser -->
            img.leftmargin3 {
                    margin-left:px;
                }
            img.leftmargin4 {
                    margin-left:px;
                }
            img.leftmargin5 {
                    margin-left:px;
                }
            img.leftmargin6 {
                    margin-left:px;
                }
        </style>

    </head>    

    <body>
<!-- <img class="leftmargin" src="xxx.jpg"> -->
<!-- <img class="leftmargin2" src="xxx.jpg"> -->
<!-- <img class="leftmargin3" src="xxx.jpg"> -->
<!-- <img class="leftmargin4" src="xxx.jpg"> -->
<!-- <img class="leftmargin5" src="xxx.jpg"> -->
<!-- <img class="leftmargin6" src="xxx.jpg"> -->


        
    </body>

</html>


PS, I tried hosting on photobucket too, it still doesnt work sad.gif

This post has been edited by konqrr: Sep 26 2006, 08:43 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 26 2006, 09:33 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,649
Joined: 10-August 06
Member No.: 7



CODE

background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg');


There's a space after "url".

Some other issues:

CODE

margin-left:px;


No value before the px unit.

CODE

<!-- ok, so for "top"
....
left of the browser -->


Comments inside a style sheet should look like this:

CODE

/* comment */


Here are good tools for checking CSS errors:
http://jigsaw.w3.org/css-validator/
http://htmlhelp.com/tools/csscheck/
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
konqrr
post Sep 26 2006, 09:45 AM
Post #3





Group: Members
Posts: 2
Joined: 26-September 06
Member No.: 236



QUOTE(Christian J @ Sep 26 2006, 10:33 AM) *

CODE

background-image: url ('http://img147.imageshack.us/img147/9826/background3wu4.jpg');


There's a space after "url".

Some other issues:

CODE

margin-left:px;


No value before the px unit.

CODE

<!-- ok, so for "top"
....
left of the browser -->


Comments inside a style sheet should look like this:

CODE

/* comment */


Here are good tools for checking CSS errors:
http://jigsaw.w3.org/css-validator/
http://htmlhelp.com/tools/csscheck/


OMG I love you. Thank you so much. I was asking my programming teacher all day about this and she didnt know what the problem was. You were a huge help, thank you soooo much biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 05:28 PM