Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2009
    Posts
    29
    Plugin Contributions
    0

    Default Define Pages Editor Main Page line spacing

    Hello, quick question on how to change line spacing. I have edited the main page using the define pages editor writing two paragraphs and line space between the two in editor is one single line space.

    Problem is when I look on site the space between the paragraphs looks to be more, like 1.5 line spacing. It's like there is setting somewhere for space before and space after paragraphs. Anyone know how I can fix this or what the spacing code is?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Define Pages Editor Main Page line spacing

    The wysiwyg editors commonly bundled with zencart have many limitations, and there is no real solution to this. There's talk of moving away from HTMLArea and to TinyMCE, which is a better product.

    So, you have to do stuff manually, and the easiest is to add custom <div id's> to your defined pages text, and then put these ID's into the stylesheet.

    For example, if your home page text is a follows:

    ----------------------------------------------------------------------------
    Welcome to my fantastic new store. Of all
    the Zencart stores ever built, this one is by far the most beautiful,
    creative, functionally perfect and worthy of every position in the
    first 10 pages of a Google search result.

    If you sign up today, I will give you $10,000 to spend as you wish
    on any product. All shipping is absolutely free. All our products
    come with a lifetime guarantee and are quite simply the best
    product ever invented in the entire history of the world.

    ----------------------------------------------------------------------------

    Your define page HTML could look like this:

    HTML Code:
    <div id ="homePageWelcome">Welcome to my fantastic new store. Of all the Zencart stores ever built, this one is by far the most beautiful, creative, functionally perfect and worthy of every position in the first 10 pages of a Google search result.
    <br />
    <br />
    If you sign up today, I will give you $10,000 to spend as you wish on any product. All shipping is absolutely free. All our products come with a lifetime guarantee and are quite simply the best product ever invented in the entire history of the world.</div>
    As you see, I have encased the text in their own <DIV> to whiich I have applied my own custom style id...

    <div id ="homePageWelcome">

    If I now go to the stylesheet and add:

    Code:
    #homePageWelcome {
     color: #AD1400;
     line-height: 200%;
    }
    I will get:

    Welcome to my fantastic new store. Of all

    the Zencart stores ever built, this one is by far the most beautiful,

    creative, functionally perfect and worthy of every position in the

    first 10 pages of a Google search result.


    If you sign up today, I will give you $10,000 to spend as you wish

    on any product. All shipping is absolutely free. All our products

    come with a lifetime guarantee and are quite simply the best

    products ever invented in the entire history of the world.
    Last edited by schoolboy; 13 Sep 2009 at 09:34 AM.
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Define Pages Editor Main Page line spacing

    Of course... as it's got its own style ID, you can configure the declarations however you wish.

    line-height: 200% is just my example. If you want 150%, that's your choice.
    20 years a Zencart User

  4. #4
    Join Date
    Sep 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Define Pages Editor Main Page line spacing

    Hi schoolboy,

    Thanks for the fantastic explaination, very clear and I understand now will do that.


  5. #5
    Join Date
    Sep 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Define Pages Editor Main Page line spacing

    Another question along same lines, can this type of code (div id) be done for the HEADING_TITLE in the index file? Tried but didn't work home page no longer displayed. Does it need to be done some other way because this title is in an 'elseif' statement?


  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Define Pages Editor Main Page line spacing

    Quote Originally Posted by cherylam1103 View Post
    Another question along same lines, can this type of code (div id) be done for the HEADING_TITLE in the index file? Tried but didn't work home page no longer displayed. Does it need to be done some other way because this title is in an 'elseif' statement?

    You need to be more specific here.. What index.php file? The LANGUAGE file ...?
    20 years a Zencart User

  7. #7
    Join Date
    Sep 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Define Pages Editor Main Page line spacing

    Quote Originally Posted by schoolboy View Post
    You need to be more specific here.. What index.php file? The LANGUAGE file ...?
    Yes sorry it is the language/english/index.php file.

  8. #8
    Join Date
    Sep 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Define Pages Editor Main Page line spacing

    Quote Originally Posted by cherylam1103 View Post
    Yes sorry it is the language/english/index.php file.
    This is the section in that index file that I could like to maybe center, add line spacing to and change colour.

    elseif ($category_depth == 'nested') {
    // This section deals with displaying a subcategory
    /*Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'*/
    define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart&trade; E-Commerce Solution.');
    }

    Thanks

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Define Pages Editor Main Page line spacing

    The following way is a crude hack, but it will work:

    define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart&trade; E-Commerce Solution.');

    define('HEADING_TITLE', '<div id="congratsMessage">Congratulations! You have successfully installed your Zen Cart&trade; E-Commerce Solution.</div>');


    (Then your stylesheet)...

    #congratsMessage {
    text-align: center;
    color: #d4d4d4;
    }
    20 years a Zencart User

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Define Pages Editor Main Page line spacing

    That text is already well identified. All you need to do is add to your stylesheet

    h1#indexDefaultHeading {what: ever;}

    The "Welcome Guest..." line can be controlled with

    h2.greeting {what: ever;}

 

 

Similar Threads

  1. Replies: 5
    Last Post: 3 Jun 2014, 05:42 PM
  2. Can't Edit Define Main Page in Define Page Editor
    By robynannw in forum General Questions
    Replies: 2
    Last Post: 8 May 2010, 05:15 PM
  3. Line spacing in define pages section
    By The End Zone in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Oct 2008, 02:58 AM
  4. Define pages editor - prevent new line
    By tqualizer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Nov 2007, 05:23 AM
  5. Main Page(Define Pages Editor) throws page width off
    By audradh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Jun 2006, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg