davesgonechina
Member
Posted 8 years ago #
Hey guys and girls. I'd like to include a small image at the beginning of each post title. I tried simply doing <img src="blahblah" align=left width, height, etc>TITLE in the post title box. The pic displays, but then the text of the title is repeated, as in IMG TITLE>TITLE.
Now since I'd like this for every post title, it would make sense to put it in my style sheet - but I don't know how, and also I've heard CSS isn't for content - though this is repetitive, static and simply for presentation. Obviously, if you haven't figured it out yet, I don't know anything about CSS.
Dave Lyons
Try something like
h2 {
background: url(path/to/image.jpg) no-repeat;
padding-left: 30px; /* This should be the width of the image */
}
davesgonechina
Member
Posted 8 years ago #
Hey Allusion, thanks a bunch... now I just have to play with the actual image size and the padding. Is there a good website to crash course in DIV tags? I feel cramped and the table I'm using for the site title is awkward. Plus, I'd like the title to stretch across and have three columns below (two menus flanking the posts).
NuclearMoose
Member
Posted 8 years ago #
Dave,
Besides the excellent link posted by pospel, here are two others:
Community MX
Position Is Everything
Have fun!
Craig.
Just to add to the list:
glish.com: Excellent resource that includes premade templates of common layouts (2 column, 3 column, etc.)
W3C Schools: Why not learn from the people who write the standards?
A List Apart: An excellent site with loads of articles related to xhtml/css
There are many more if you are interested, just ask!!
It's W3schools, not W3C Schools. W3school is not associated with the W3C, and their toturials don't really validate either. I use them reference wise a bunch to look up something quickly though, so I do use them.
The W3Schools CSS reference is top notch, I use it all the time.