Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 05:25:00 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Special CSS styles in Admin Editor  (Read 1139 times)
sjbt

Offline Offline

Posts: 24


« on: December 17, 2007, 07:53:21 PM »

I can't find a post that seems to answer this.  How do I set a style, call it page_title, to show up in the WYSIWYG (FCKEditor)?  I want the user to be able to easily set the page title style.

If I use editor.css then all other styles are wiped out and the element "page_title" shows up in the drop down box in the color I'm styling it to. I don't want it to do that. In any case, selecting it does not style the text. (source shows that the style was set but it does not display with the styles.

So, basic question -- how to I set a style for page_title that the admin user can select
                             and, it doesn't effect the text that shows in the drop down box
                             and, setting it does change the text on the page to display it with the style?

For instance, if the style is for the font to be gray, 1.4em and centered, then the html page shows it that way but the style in the drop down box in admin is black?  Right now, the drop down box shows it gray and the page shows it as normal text (without any styling).

Thanks for your help!
Logged
marathoner

Offline Offline

Posts: 495


« Reply #1 on: December 17, 2007, 09:04:05 PM »

Maybe I misunderstand but it sounds like two different things. Your page will display using screen.css and print.css (unless your template uses different CSS file names). FCKEditor will use editor.css to display the page that you are editing. Normally, I would make my screen.css and editor.css the same except to modify the editor.css to use the appropriate starting point (e.g. if your content is in a DIV wrapper such as "content" that is styled then you need to build this into your editor.css body tag).

What FCKEditor calls a style is actually a CSS class in your editor.css file. Just add page_title class to your editor.css (and probably your screen.css and print.css too if you want them to display or print that way).

You can use any class name you want such as page_title, but I think most people would simply use one of the header elements h1, h2...h6 (styled the way that they want) for something like a page title.
« Last Edit: December 17, 2007, 09:11:09 PM by marathoner » Logged
sjbt

Offline Offline

Posts: 24


« Reply #2 on: December 18, 2007, 03:13:38 AM »

I think I have it figured out now. Thanks!
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!