Jump to content

Unable to see the header


laxi

Recommended Posts

Hi all,

 

I am not sure why my header is not displaying the header image after using the CSS

 

I have a png file that repeats horizotally.

 

Please help

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Wikigets The online store</title>
<style type="text/css">
body { margin:0 px;}

#pageTop {
background:
url(style/headerline1.png);
height:110 px;
}
</style>
</head>
<body>
<div id="pageTop"> </div>
<div id="pageMiddle"></div>
<div id="pageBottom"></div>
</body>
</html>post-165222-0-63372800-1404737747_thumb.pngpost-165222-0-63372800-1404737747_thumb.png

Link to comment
Share on other sites

Hi 

 

Thank You for the reply .

 

I tried your solution. It still does not display header.

 

Not sure what is wrong. Is the png?

 

Please help.

 

 

You need single quotes for the url string



url('style/headerline1.png');

Also please make sure to use the forums code tags to post code.  It's the <> button under the smiley face icon.

Link to comment
Share on other sites

Hi 

 

Thank You for the reply .

 

I tried your solution. It still does not display header.

 

Not sure what is wrong. Is the png?

 

Please help.

<!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
 <title>Wikigets The online store</title>
 <style type="text/css">
 body { margin:0 px;}

 #pageTop {
 background:
 url(style/headerline1.png);
 height:110 px;
 }
 </style>
 </head>
 <body>
 <div id="pageTop"> </div>
 <div id="pageMiddle"></div>
 <div id="pageBottom"></div>
 </body>

Hi 

 

Thank You for the reply .

 

I tried your solution. It still does not display header.

 

Not sure what is wrong. Is the png?

 

Please help.

Link to comment
Share on other sites

Well it surely needs the single quotes, it's not correct syntax otherwise and will surely fail for that reason.  Are you sure that you have the correct path to the image?  Is the image found in the style directory?  you could also try the background-image: property instead of the basic background:

 

Remember the image path in the css is relative to where the css file is located, not to the page the css file is on.

Edited by fastsol
Link to comment
Share on other sites

Oh, you don't have any content in the div, so it's collapsed to nothing.  If you don't have contente in a div and you want to see the background you need to give the div a height and width property.

#pageTop {

background:

url(style/headerline1.png);

height:110 px;

}

 

the above already defines the height. It is already there in style code in my code.

 

Do i still need to do anything?

 

Thank You again for the response

Link to comment
Share on other sites

Still no luck,

 

I have attached screen captures. Not able to figure out why the header is not displaying.

 

Please edit my code if there is any issues so that png can be seen in the header.

 

Thank you again

 

 

 

 

You need a width also if there is no content.  Have you actually tried putting ANYTHING in the div and see that it works.  AGAIN you NEED the single or double quotes around the image path in the css.

 

post-165222-0-83543100-1404818356_thumb.png

post-165222-0-04882600-1404818376_thumb.png

post-165222-0-06197400-1404818405_thumb.png

Link to comment
Share on other sites

Thank you..That fixed the issue.  ::) 

 

 

Ahh, you can't have a space between the number and the px in your css.  Must be 1000px not 1000 px.  That goes for your margin above also and obviously any other css you make.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.