Forum Moderators: mack
Do it like this in your Stylesheet [webmasterworld.com]:
#mybgimage {
background-image: (/path/to/pic.jpg);
repeat: no-repeat;
}and this in your html
<div id="mybgimage">blah blah</div>
Of course you could apply that class to any element.
tip: We leave ALL CAPS to the email spammers and AOL's ;-)
Nick
This is my first time with the pros.
Your suggestion should work but I don't know how to do the stylesheet thing.
What is the stylesheet code and the html code you're suggesting?
What's the # sign in #mybgimage?
background-image: (/path/to/pic.jpg);
What's the (/path/to/pic.jpg);?
Where does the "<div id="mybgimage">blah blah</div>" go in the code?
What's the "blah blah"?
What do you mean by "that class to any element"?
Help!
This should get you started with CSS: Introduction to CSS [webmasterworld.com] - I also just wrote a little welcome post with some handly links and info here: [webmasterworld.com...]
The # signifies an 'id' - a unique identifier for any html element (tags like <p>,<div>,<table> etc) More in the link above.
As for the rest, take a look at www.w3schools.com for a basic html course, my wife is taking it at the moment and says it's very good. gotta see what her pages look like theough eh?
If you have any questions that aren't covered then post them here, or in the appropriate specific forum, this place is full of people at all kinds of levels and sometimes, it's hard to know even where to look! -
Nobody will mind simple questions, you've made the best step so far by finding this site, and everybody starts somewhere right?
Have fun!
Nick
pfrpwr, welcome to WebmasterWorld. Let me point you to this thread, which is a introduction to the concepts of CSS [webmasterworld.com], including direct examples on how to write stylesheets, how to apply them to your pages, and about everything else to get you started.
learning the basics of CSS is really not hard, just do some experiments and you will soon be in to it.
Good luck!
<added>Nick beat me...</added>
If you don't have it already, download a trial of Dreamweaver MX. You don't have to buy it, just use the trial time to play around a bit for free.
The program has a decent CSS editor for both internal and external stylesheets. So you can make simple changes here and there and preview them immediately. Also gives you a chance to see how stylesheets are coded as well as how they interact with the html.
I hate reading how to do things the "manual way" unless I've dirtied my hands a bit with some sort of off-the-shelf script or program. Makes the learning process go much smoother, well for me at least.