Forum Moderators: not2easy
I am a designer and I am new to CSS. I have created a layout using CSS.
But the problem is I am not able to get the background of the page replicate.
Please check this URL and you should understand
The css is here
---------------------------------------------
#bg
{
background:url(images/bg.jpg)repeat-y;
position:absolute;
width:934;
left: 34px;
top: 381px;
}
---------------------------------------------
and I am using this ID in my HTML page here
---------------------------------------------
<div id="bg">
<h1>Welcome to </h1>
<div id="intro">
<h4>is a unique mockup service started to help web design companies and freelancers in getting their mockups for projects and bids in less than 8 hours!</h4>
<h4>Let us know your project specifications and we shall create a mockup for you in less than 8 hours. <a href="@">Read the project submission guidelines</a> before sending us your requirements. </h4>
---------------------------------------------
I am not sure what is happening and how to achieve it.
You can see the bg cuts off and is not extended as the image length.
Dont know how to do it.
Could someone please help me.
Thanks
[edited by: jatar_k at 9:34 pm (utc) on April 16, 2008]
I'd make sure the box you are trying to give background has a vertical size (if e.g. all in it is floated, or absolutely positioned, it might not have a height at all). You can add borders/outline in a striking color to see if they show up. (I use the webmaster toolbar in firefox to check that without touching the CSS or HTML)
Next make sure the URL of the image is correct it's a relative URL ... it's probably easier to make it absolute if you're in doubt.
Finally I'd make the parsers of the browsers' life a bit easier: add a space before the repeat-y, but it's valid CSS not to do that (I was somewhat surprised to see that).
What's not valid CSS is not adding a unit after the width:934 (it probably should read "width:934px")
So make sure your html and css fully validate.
Edit: I stopped reading at the "as you can see", (as I could not), sorry.
Now see you say it gets cut off: add the right height (or add min-height) to your #bg and it should be fixed.