Forum Moderators: not2easy
Ok I aren't using a doc type. i know I'm meant to and I will soon. Once I can get this height problem down I will be adding a doc type to my site. Anyway to the problem.
I have my whole site layout pretty much finished and done except. I have it set to a fixed height of 1000px. This is annoying me, I don't want a set height but for my DIV's background to work it seems to be the only way. I have tried I don't know how many times using CSS to make the background work and I have it working but only using height:1000px; So I all my site code within a container DIV. If I set the height to 100% the background shows up until about halfway down the content. So I tried not setting the height and then I don't get anything the DIV's background does not show.
Relevant Html:
<body>
<div id="container">
//Site goes here
</div>
</body>
Relevant CSS:
#container{
position:relative;
width:822px;
top:0px;
margin: -15px auto;
background-image: url(crisscross001.png);
background-repeat: repeat;
border-style: solid;
border-width: 0px 3px 3px 3px;
border-left-color: #808080;
border-right-color: #808080;
border-bottom-color: #808080;
}
I've spent absolutely hours trying to do it. So any help would be greatly appreciated.
[edited by: SuzyUK at 1:35 am (utc) on Jan. 7, 2008]
[edit reason] examplified url [/edit]
Regarding background centering did you try:
background-repeat:no-repeat;
background-position:middle center;
?
Thanks for all your help by the way and sorry for posting this topic when I solved it myself. :(
Wish there was an edit post on here.
The code you gave isn't necessarily everything necessary for your problem. Chances are if you aren't specifying a height for the container, that it's collapsing to zero height due to exclusive use of floats or absolute positioning inside the div.
If you want a background image for the page, why not put it in the body?
You shouldn't ever really be setting the height for things that hold content, or almost anything for that matter.
If this new IE problem with a doctype? adding a doctype may fix it. We'd still need more code to diagnose that problem though. There also is an edit link which works on RECENT posts, to the left of the post (by the name, info, stickymail, etc.) called "owner edit".
[edited by: Xapti at 7:23 am (utc) on Jan. 7, 2008]