XSitePro Website Design Software Message Board

The online forum dedicated to XSitePro users. Get help with website design in general and using this popular and incredibly powerful website software
It is currently Tue May 21, 2013 3:26 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Mar 15, 2012 11:26 am 
Offline
User avatar

Joined: Sat Aug 30, 2008 7:22 pm
Posts: 1888
Location: The road less traveled...
XSite Pro should provide an easy way to set the default font for a website. (The lack of this feature is likely another shortcoming of the Pinedit editor.) I once thought that I could do this by editing both xsp_styles.css files and replacing all occurances of Verdana with Tahoma or Helvetica. While this works for already published sites, XSite Pro will flip the font back to Verdana the next time the website is loaded in XSite Pro.

Many of us do not want to use Verdana. Sure, we can change the font by adding a script to Global Scripts. We also want to be able to work with our preferred font in the Design editor without having to add a lot of code bloat by having to set every paragraph to our preferred font.

Being able to set a default font would be a welcome improvement.

_________________
XSitePro runs great on HostGator (WordPress does, too)
Image


Top
 Profile  
 
PostPosted: Mon Mar 19, 2012 10:10 am 
Offline
User avatar

Joined: Fri Feb 24, 2006 1:53 pm
Posts: 3443
Location: Vancouver, BC, Canada
I do this using CSS in Global Scripts > HEAD section. For example:
Code:
<style>
body, p, td, ul, ol, div {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
It works perfectly, but most XSitePro owners have no experience with CSS, so I agree that future versions should have some way of setting this.

If you're wondering why I added the "td" tag to the CSS, it's because text added to table cells won't automatically inherit the new font from the BODY tag. If the text in the table is not wrapped in a "p" tag or a "div" tag (both of which I have added to the list of selectors), it will use XSitePro's default Verdana font. I'm compensating for that by adding the "td" tag to the list of selectors.

If you want your headings to use the new font, too, add the "H1," "H2", etc. selectors to the CSS. Example:
Code:
<style>
body, p, td, ul, ol, div, h1, h2, h3, h4, h5, h6 {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
You can still style the headings separately in the CSS. Example:
Code:
<style>
body, p, td, ul, ol, div, h1, h2, h3, h4, h5, h6 {font-family: Georgia, Times, "Times New Roman", serif;}
H1 {font-size: 24px; color: red;}
H2 {font-size: 18px; color: green;}
</style>
Inline elements like span tags, blockquotes and hyperlinks will use the new font automatically, but you can also add them to the CSS, if you wish. Example:
Code:
<style>
body, p, td, ul, ol, div, span, blockquote, a {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
There's another list tag besides "ol" and "ul" that most people don't ever use. It's called "dl" (Definition List). Add it if you use it. Example:
Code:
<style>
body, p, td, ul, ol, dl, div {font-family: Georgia, Times, "Times New Roman", serif;}
</style>

_________________
Andrea Wilson

1. Custom XSitePro Templates. XSitePro Consulting and Training. FREE TIPS!

2. Off-the-Shelf XSitePro Templates! Versatile designs. Easy to manage and maintain!

3. AllWebMenus Pro and XSitePro Work Perfectly Together! NEW!

Image


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 9:39 pm 
Offline
User avatar

Joined: Sat Aug 30, 2008 7:22 pm
Posts: 1888
Location: The road less traveled...
Thanks Andrea, this is great information for those of us who know how to use it and why it works.
It would be a big improvement if XSite Pro provided a better way to change/extend the CSS.

Until then, I'll add this code to my XSite Pro CSS snippet library. I've started adding classes to various website structures so that I can use them to reduce the amount and complexity of the HTML code required.

_________________
XSitePro runs great on HostGator (WordPress does, too)
Image


Top
 Profile  
 
PostPosted: Sun May 27, 2012 10:23 am 
Offline

Joined: Mon Mar 19, 2012 3:08 am
Posts: 7
Hi Andrea

I've put this code in Other>Global Scripts>In The Head Section of the page:

<style>
body, p, td, ul, ol, div {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
<style>
body, td, p, ul, ol, li {font-size: 12pt}
</style>

But when i come back to webpage>design section I still saw Verdana & 10 pt??

Thx for enlightening me.

Ebe

ablewebs wrote:
I do this using CSS in Global Scripts > HEAD section. For example:
Code:
<style>
body, p, td, ul, ol, div {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
It works perfectly, but most XSitePro owners have no experience with CSS, so I agree that future versions should have some way of setting this.

If you're wondering why I added the "td" tag to the CSS, it's because text added to table cells won't automatically inherit the new font from the BODY tag. If the text in the table is not wrapped in a "p" tag or a "div" tag (both of which I have added to the list of selectors), it will use XSitePro's default Verdana font. I'm compensating for that by adding the "td" tag to the list of selectors.

If you want your headings to use the new font, too, add the "H1," "H2", etc. selectors to the CSS. Example:
Code:
<style>
body, p, td, ul, ol, div, h1, h2, h3, h4, h5, h6 {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
You can still style the headings separately in the CSS. Example:
Code:
<style>
body, p, td, ul, ol, div, h1, h2, h3, h4, h5, h6 {font-family: Georgia, Times, "Times New Roman", serif;}
H1 {font-size: 24px; color: red;}
H2 {font-size: 18px; color: green;}
</style>
Inline elements like span tags, blockquotes and hyperlinks will use the new font automatically, but you can also add them to the CSS, if you wish. Example:
Code:
<style>
body, p, td, ul, ol, div, span, blockquote, a {font-family: Georgia, Times, "Times New Roman", serif;}
</style>
There's another list tag besides "ol" and "ul" that most people don't ever use. It's called "dl" (Definition List). Add it if you use it. Example:
Code:
<style>
body, p, td, ul, ol, dl, div {font-family: Georgia, Times, "Times New Roman", serif;}
</style>


Top
 Profile  
 
PostPosted: Sun May 27, 2012 10:51 am 
Offline
User avatar

Joined: Fri Feb 24, 2006 1:53 pm
Posts: 3443
Location: Vancouver, BC, Canada
First of all, you don't need/want two sets of style tags, so you would do the CSS like this:
Code:
<style type="css/text">

body, p, td, ul, ol, li, div, span, blockquote, a {font-family: Georgia, Times, "Times New Roman", serif; font-size: 12pt; }

</style>
You may still see Verdana 10pt in the Design view, but try Previewing the page. The Preview will pick up the custom CSS.

_________________
Andrea Wilson

1. Custom XSitePro Templates. XSitePro Consulting and Training. FREE TIPS!

2. Off-the-Shelf XSitePro Templates! Versatile designs. Easy to manage and maintain!

3. AllWebMenus Pro and XSitePro Work Perfectly Together! NEW!

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group