Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding a background to text entered via Define Pages Editor

Adding a background to text entered via Define Pages Editor

Locked

Views: 1,804

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
3 Jan 2010, 10:17 PM
#1
edessa avatar

edessa

New Zenner

Join Date:
Nov 2009
Posts:
6
Plugin Contributions:
0

Adding a background to text entered via Define Pages Editor

First of all, I’m really sorry if I’ve placed this is the wrong place.

Ok.. I'm not really sure how I can explain this properly, so please tell me if you would like me to explain it in a different manner.

I guess what I want to be able to do is add a background to the data entered through the define pages editor. For example, I want the main page to first show a swf banner (which I've already done). This already has a red border with a curved background. Then I have the welcome message, which I want to add a background to (a rectangle with curved edges)

I think it may be possible to use div's. Since I may choose to change the length of the content, I want the size of the background to change. I thought I could split the image up into three parts. The first would have the top part of the image with the top two curved corners, the next div will be placed below with a background on repeat, and the last will have an image with the bottom two corners.

It’s rather long winded and tedious, but I was curious if someone could explain how exactly I would go about coding this.

I’ve tried:

In the define pages editor:
<div class="MainText">text</div>

and in the css styleshet I have:
.divMainText { background-color: transparent;background-image: url("../images/Main/Text.gif");background-repeat:repeat-x; }

And:

In the define pages editor:
<div id =”MainText”> </div>

And then in the css I have
#Main Text {
Background-colour: transparent
Background-image: url(.../images/Main/Text.gif)
Background-repeat: repeat-x
}

But both don’t seem to work

Any help would be appreciated.

3 Jan 2010, 10:25 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Adding a background to text entered via Define Pages Editor

Problem could be your CODE SYNTAX... the PROCEDURE seems logical.

3 Jan 2010, 10:28 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding a background to text entered via Define Pages Editor

CSS is very strict about spelling and capitalization. If you have a div with class or id of ”MainText”, you need to style in the stylesheet
.MainText {}
or
#MainText {}
respectively.

The common practice for CSS selector names is to use "camel caps", which means lowercase beginning with words in the middle capitalized: "mainText"
This is just a convention and you don't have to follow it.

2 Feb 2010, 10:19 AM
#4
coffee23 avatar

coffee23

New Zenner

Join Date:
Jan 2004
Posts:
19
Plugin Contributions:
1

Re: Adding a background to text entered via Define Pages Editor

Hi,

Hope nobody minds me jumping on this thread...

I would like to add a different background image to each page (eg. Shipping, Privacy, Terms and so on), however i only want to add it behind the text that you edit on the "Define Pages Editor" and so that it only shows behind the text i have put.

However at the moment all i am doing is changing is the background for the whole page (eg. when i click on shipping it shows the backgroung image around the page but not under the text i have edited.

Any advice would be greatly received.

2 Feb 2010, 11:16 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Adding a background to text entered via Define Pages Editor

Easiest way would be in the stylesheet:

#shippingInfoMainContent {background-image: url(../images/your_image.jpg);

You'll need to use Web Developer to see what the id name is for the other pages.

And yes, it's usually better to start your own thread, rather than adding a new question to an existing one.

2 Feb 2010, 12:09 PM
#6
coffee23 avatar

coffee23

New Zenner

Join Date:
Jan 2004
Posts:
19
Plugin Contributions:
1

Re: Adding a background to text entered via Define Pages Editor

stevesh:

Easiest way would be in the stylesheet:

#shippingInfoMainContent {background-image: url(../images/your_image.jpg);

You'll need to use Web Developer to see what the id name is for the other pages.

And yes, it's usually better to start your own thread, rather than adding a new question to an existing one.

Thanks & sorry.