Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Background image on Special pages help with CSS or code?
#3
In my GetSimple templates, on the body element I usually add an ID using the page's slug (like you do, however I prefix mine with "d-" to avoid ID collisions) and also add the page's parent slug as a class (also prefixed with "p-") which helps to style sections .

Code:
<body
  id="d-<?php echo get_page_slug(false); ?>"
  class="p-<?php echo (get_parent(false) != '') ? get_parent(false) : 'orphan' ?>">

(I've put the attributes on their own line here for readability, they'd normally be on the same line. I also add the body's ID as a class in an effort to avoid the (apparent) bad practice of using ID's in CSS selectors.)

So say you had that in place, it would just be a matter of tweaking your CSS to this:

Code:
#d-news, .p-news {
    background: url(/data/uploads/siteImgs/bkgrd-news.jpg) no-repeat  top left;
}
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply


Messages In This Thread
Background image on Special pages help with CSS or code? - by sal - 2012-09-26, 07:30:54



Users browsing this thread: 1 Guest(s)