Forum Moderators: not2easy

Message Too Old, No Replies

CSS column background image not appearing

CSS background image not appearing

         

Wabbit

5:30 am on Dec 11, 2008 (gmt 0)

10+ Year Member



Ok so I'm new with CSS coding, but I'm retty sure i have done everything right.

I'm re-writing my site to use CSS and PHP Include so i can change the style of my webpage easily at a later date.

I know the CSS is acting on the HTML because it sections it into a column and added a border that i put in to debug the width.

My question is, is there a reason that the image would for the background would repeat for the header/footer but not this column. Below is the CSS and then the HTML, tell me if you see anything :)

//CSS\\

/* Left */

#leftcol {
float: left;
width: 220px;
}

#leftcol .boxed {
margin-bottom: 10px;
}

#leftcol .boxed .title {
height: 20px;
background: url(http://www.example.com/images/img07b.gif) no-repeat;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 11px;
color: #FFFFFF;
}

#leftcol .boxed .content {
padding: 15px 15px 0 15px;
background: #E5ECED url(http://www.example.com/images/img01b.gif) repeat-x;
}

#leftcol .boxed blockquote {
background: #E5ECED url(http://www.example.com/images/img08.gif) repeat-x;
}

//HTML\\

<div id="leftcol">
<div id="boxed">
<h2 class="title">Test</h2>
<div id="content">
<p>omg this is a super secret test of awesomeness :D</p>
</div>
</div>
</div>

P.S: I have triple checked the image link and it is correct.

Thanks in advance for any help.
(\/)
(..)

[edited by: eelixduppy at 5:48 am (utc) on Dec. 11, 2008]
[edit reason] exemplified [/edit]

limbo

2:57 pm on Dec 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Floats cause the container to appear inline - the clear hack will work, but isn't the most handsome solution

Place an empty div pair at the bottom of the column, before the columns closing </div> with the property/value {clear:both;}

Wabbit

3:02 pm on Dec 15, 2008 (gmt 0)

10+ Year Member



Okey dokey, tried that hack Limbo with no success :/

thanks for the suggestion anywayz (: