Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Edit the color of JUST the welcome text

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-12-2005, 07:42 AM
 
Brian Peat Brian Peat is offline
 

Advanced Member
  
Join Date: Aug 2004
Location: Mc Connellsburg, PA
Posts: 73
 

Default Edit the color of JUST the welcome text

I did a search and found a few hints at doing this, but nothing really clear.

Basically I am building a site for a client, and the main background color for the store is black. The boxes inside that all have white backgrounds, so the body text needs to be black to show up there. The problem is, that pseky welcome message is also black.

I attempted to add some font class tags into the welcome.tpl file, but they simply get ignored.

Does anyone know of a way (even if I have to make new css tags, which I did already) to get JUST that welcome text to show up white?
__________________
X-Cart Gold 4.3.1
Php 5.2.14
MySQL: 5.1.52
My Machine: OS X 10.6.5
Reply With Quote
  #2  
Old 12-12-2005, 07:50 AM
 
Brian Peat Brian Peat is offline
 

Advanced Member
  
Join Date: Aug 2004
Location: Mc Connellsburg, PA
Posts: 73
 

Default crap

Crap, I'm realizing just how hard this is going to be. There is text outside my white boxes all OVER the site.

So, maybe it's eaier to change the text INSIDE the main product boxes instead? If so, anyone care to suggest how to do that?
__________________
X-Cart Gold 4.3.1
Php 5.2.14
MySQL: 5.1.52
My Machine: OS X 10.6.5
Reply With Quote
  #3  
Old 12-12-2005, 08:17 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

<font> tags are depreciated and should not be used. The easiest way to fix your problem is just going to be to surround the welcome text in customer/main/welcome.tpl with a <div> tag like this:

Code:
<div style="color: #FFFFFF;">{$lng.txt_welcome}</div>

You can also control the 'white boxes' by editing the .dialogbox style in skin1.css.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 12-12-2005, 08:40 AM
 
Brian Peat Brian Peat is offline
 

Advanced Member
  
Join Date: Aug 2004
Location: Mc Connellsburg, PA
Posts: 73
 

Default thanks

Thanks.

Since I have to visit this client in about 20 min, I gave up for now and used a few shades of grey for the different boxes, except for the dialog, which is white. It works, but I might revisit this using Div tags and report back if I was successful or not.

the most frustrating part is that I couldn't seem to override the Body tag, but I'm betting if I can get the Div tags to work that'll do the trick (lets hope).
__________________
X-Cart Gold 4.3.1
Php 5.2.14
MySQL: 5.1.52
My Machine: OS X 10.6.5
Reply With Quote
  #5  
Old 12-12-2005, 08:43 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Yes, DIV will override the body tag, font will probably not.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 12-12-2005, 03:28 PM
  Stephen Hatton's Avatar 
Stephen Hatton Stephen Hatton is offline
 

Senior Member
  
Join Date: Mar 2004
Location: Melbourne, Australia
Posts: 182
 

Default

Hi Brian Peat

Alternatively turn the text into a paragraph and define it in the style sheet.

Wrap the text
Code:
<p class="YourStyleName"> {$lng.txt_welcome} </p>

and in your skin1/skin.css put the following lines:

Code:
p.YourStyleName { color: #FFFFFF; background-color: inherit } /* White */

At any time you can change the colour by changing the style sheet and the colour is definitely locked into that class.

A problem with the .Style that xcart uses is that they are global and can be used for fonts, tables, backgrounds, which then makes it very hard to change one thing without affecting many other things.

If we had slow modems all the time, then we would have to stick to the old way (lean and mean and near enough is good enough), but with ADSL and Cable Modems, that is no longer the case, and we should start to separate our titles, tables, backgrounds, etc. to take control of the looks.

Regards
Ing. Stephen Hatton
__________________
Apache Linux V1.3.33
PERL version: 5.8.0
PHP version: 4.3.11
MySQL version: 4.0.22-standard
X-cart V4.0.17: Addons: X-PConfig, X-Giftreg, X-Fancycat, X-AOM
Reply With Quote
  #7  
Old 03-18-2006, 09:18 AM
 
gramps gramps is offline
 

Member
  
Join Date: Jun 2005
Posts: 28
 

Default Color of Welcome Only

[quote="balinor"]<font> tags are depreciated and should not be used. The easiest way to fix your problem is just going to be to surround the welcome text in customer/main/welcome.tpl with a <div> tag like this:

Code:
<div style="color: #FFFFFF;">{$lng.txt_welcome}</div>

v4.0.14
Tried solution above to no avail. Suggestion is for v4.0.12& 16 I believe, what to do about v4.0.14
Reply With Quote
  #8  
Old 04-09-2006, 04:02 PM
 
justme justme is offline
 

Member
  
Join Date: Jul 2004
Location: Western New York State, USA
Posts: 28
 

Default

Simple...
Just edit the Welcome text in the Languages section.
<font color="#FFFFFF"> This text is white. </font>
Works in every version.

Although I do use style in the overall design, the depreciated font tags still work, and I use them in the variable text that my clients edit themselves.

~ justme ~
Reply With Quote
  #9  
Old 04-09-2006, 04:35 PM
 
gramps gramps is offline
 

Member
  
Join Date: Jun 2005
Posts: 28
 

Default

Thank you. You are truly a wonderful human being. Gramps
Reply With Quote
  #10  
Old 04-10-2006, 09:32 AM
  ryno's Avatar 
ryno ryno is offline
 

Advanced Member
  
Join Date: Feb 2006
Location: Tempe, Az
Posts: 30
 

Default

this just reminds me of all the crappy depreciated code in x-cart....

You SHOULD just use a span tag around that body copy and put the css in your style sheet. Adding styles to a "p" tag is old... You don't need a "div" layer just to do that either.

Code:
<span class="WelcomeTxt">{$lng.txt_welcome}</span>

And in your style sheet add this:
Code:
.WelcomeTxt {color:#fff;}

(me joins the team as standards & compliance advisor...
__________________
gold v4.0.18 -> live
...working on another soon
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:43 AM.

   

 
X-Cart forums © 2001-2020