Expandable background in a Div layer?

Palex

New Member
Is this possible to do? I've been using tables to achieve this effect, but if it can be done with divs, I'd be willing to switch over. I've looked for a way to put a background in a div layer, and there is no readily available option in Dreamweaver (that I can see). And I'm not a coder.
 

darrenfox

New Member
Yes it is possible and it is very easy to do with CSS. You would simply insert the background in div and have it repeat-x, repeat-y, or the default is to tile.
 

Palex

New Member
Thanks.

I find DIVs a bit hard to work with, but I know they are superior to tables. Can you recommend a website or training program that will bring me up to par?
 

PixelPusher

Super Moderator
Staff member
Palex you should also take a look a W3 Schools and click on the CSS section at the top. What you are looking to do: background in a div, is about as basic as it gets.

CSS Example
Code:
div.bgimage {
background-image:url (images/bg.png);
background-color:transparent;
background-position: center;
background-repeat: repeat-x;
width:100px;
height:100px;
}

/* IN SHORTHAND MODE */

div.bgimage {
background: transparent url(images/bg.png) center repeat-x;
width:100px;
height:100px;
}

}
 

Palex

New Member
Thanks a lot. As you can probably tell, I'm fairly new to using CSS. I've been using tables, which I know is taboo. It's just that tables are so easy to work with, whereas CSS & Divs are kind of complicated.

I guess I may see it differently with more experience.
 
Top