Asigning a background image to articles [solved]

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
plushett
Posts: 14
Joined: Thu 16. Jun 2005, 02:38
Location: San Francisco, California

Asigning a background image to articles [solved]

Post by plushett »

So I did some research, trying to find out how to asign a background image to articles. reason is my site has black background but i want articles to have black text so its easy on the eyes, how can I assign a background image just for the articles
reason i dont just asign an background image for the main block is because im using a dropdown menu the background image ends up going under the menu.
Last edited by plushett on Sun 26. Jun 2005, 10:30, edited 1 time in total.
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

for what where and why?

use a CSS class for article headline.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
plushett
Posts: 14
Joined: Thu 16. Jun 2005, 02:38
Location: San Francisco, California

I figured it out!

Post by plushett »

I just added a background image to the content tag like so:

<div style="margin-left:10px; margin-right:10px; margin-top:5px; margin-bottom:10px; background-image:url(http://eccentriclife.com/cmpages/pictur ... ground.jpg)">{CONTENT}</div>

at least it worked...made it so the only part of the page with a background
was the content....pretty handy for working with pages that have black
background...
Got to love the trial and error method of learning...heheh...
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

always create a class :)

Code: Select all

<div style="margin-left:10px; margin-right:10px; margin-top:5px; margin-bottom:10px; background-image:url(http://eccentriclife.com/cmpages/picture/center_background.jpg)">{CONTENT}</div>
better:

Code: Select all

.contentDiv {
  margin-left:10px; 
  margin-right:10px; 
  margin-top:5px; 
  margin-bottom:10px; 
  background-image:url(http://eccentriclife.com/cmpages/picture/center_background.jpg);
}

Code: Select all

<div class="contentDiv">{CONTENT}</div>
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply