Newbie question regarding background images on headers.

Started by rahrens, October 11, 2005, 06:41:28 PM

Previous topic - Next topic

rahrens

Hello everyone,

I have been quite pleased with the volume and quality of info on these boards. Its made shifting through line after line of code that much easier to figure out. This is a gold mine of info.

However, I have hit a brick wall in trying to do one last thing on my first theme attempt with a World of Warcraft flavor.

I'd like to drop in a background image behind my headers much like forsakenlad's Matrix theme.

Thank you in advance!

Elmacik

Home of Elmacik

JayBachatero

He added the bg this way using the background atribute.  but also you can do it with the css file under catbg style
<td colspan="4" class="catbg" height="18" background="http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png">

o rlike this
.catbg
{
background-image: url(images/catbg.gif);
}
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Elmacik

Quote from: JayBachatero on October 11, 2005, 07:43:38 PM
He added the bg this way using the background atribute.  but also you can do it with the css file under catbg style
<td colspan="4" class="catbg" height="18" background="http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png">

this will cause the page to be an invalid XHTML 1.0 Transitional page.
i asked this here and searched for it much and learnt that XHTML uses styles. the code should look like this:
<td colspan="4" class="catbg" height="18" style="background-image:url('http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png')">
Home of Elmacik

JayBachatero

Quote from: elmacik on October 11, 2005, 07:49:17 PM
Quote from: JayBachatero on October 11, 2005, 07:43:38 PM
He added the bg this way using the background atribute.  but also you can do it with the css file under catbg style
<td colspan="4" class="catbg" height="18" background="http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png">

this will cause the page to be an invalid XHTML 1.0 Transitional page.
i asked this here and searched for it much and learnt that XHTML uses styles. the code should look like this:
<td colspan="4" class="catbg" height="18" style="background: url('http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png')">


I took that straight out of the theme and didnt pay attention to it.  Also most theme authors do it the css way.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

1MileCrash

Quote from: JayBachatero on October 11, 2005, 07:43:38 PM
He added the bg this way using the background atribute.  but also you can do it with the css file under catbg style
<td colspan="4" class="catbg" height="18" background="http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png">

o rlike this
.catbg
{
background-image: url(images/catbg.gif);
}


i wouldnt reccommend the first way, seeing as how it isnt valid.

<td colspan="4" class="catbg" height="18" style="background-image:url(http://forum.turkish.doom9.org/Themes/Matrix/images/bg1.png);">

^^valid way.

But still, using css would be the best choise if you attend to do any  background positioning/repeat values.

Elmanik-

having a space between background: and url wont work in all browsers! ;)
The only thing php can't do is tell you how much milk is left in the fridge.



Elmacik

Home of Elmacik

rahrens

Thanks all!
I'll have to give this a shot from work tomorrow. Look forward to seeing the results.

rahrens

One more time,

I just wanted to thank everyone. After some twists and turns, I have finally gotten the results I am looking for. I couldn't have  done without the help here though.

Thanks again!

If I get brave enough, I may post the final results here for some critique.

Robert Ahrens

Advertisement: