ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PROBLEM WITH CSS

January 21, 2012 10:47pm

Subscribe [3]
  • #1 / Jan 21, 2012 10:47pm

    Isthmos

    20 posts

    I have the following problem

    I made my templates, i have made entries and everything works fine.

    The problem is that certain parts of the page (like the description or the main text of my article) are not styled properly from css classes (much smaller fonts) when the content is dynamic (i.e. from the entries) and they are styled properly if i write some static words through HTML.

    It seems when the content is from EE the fonts become small which means that the css styles are not applied.

    Any idea how to solve this please?

    HELP!!!

    I use EE 2.2.2

    You can see in the link below that the text below title is fonts 12 while it must be 19. And the text of the article is also 12 while it should have been 15

    http://www.isthmos.com/index.php/article/mpegliths_o_papandreou_den_tha_einai_upopshfios

  • #2 / Jan 23, 2012 4:33pm

    Dan Decker

    7338 posts

    Hi Isthmos,

    I’m sorry you aren’t seeing the results you expect for your styles. What is happening here is that you have your styles applied to the tag in your html. That’s perfectly acceptable, but ExpressionEngine is also wrapping your content in tags when it displays. You can change this by changing the text formatting option for the channel field that contains this content. Go to Admin-> Channel Administration-> Channel Fields. Click the Group Name for the group that contains this field, then click the field label for the field you want to change. Look for “Default Text Formatting for This Field” under Field Options. Set the drop down to “None”. Now, in your templates, make sure the field name is between the tags properly:

    
    {excerpt}
    

    Where {excerpt} is the shortname of your field.

    I hope this helps!

    Cheers,

  • #3 / Jan 23, 2012 5:21pm

    Isthmos

    20 posts

    i ‘ve already done this but unfortunatelly i don’t see such an option “Default Text Formatting for This Field” drop down to “None” for Wygwam that i use for the main text of the article .

    Any suggestion to fix it?

  • #4 / Jan 24, 2012 4:24pm

    Isthmos

    20 posts

    Anyone to help me?

  • #5 / Jan 24, 2012 7:28pm

    Barrel

    92 posts

    Since WYGWAM is adding your p tags, i would wrap your excerpt with a div

    <div class="txt16">
    {excerpt}
    </div>

    and then in your css, have your p tags inherit their size from .txt16 (I would recommend renaming txt16 to excerpt, but that’s a different discussion):

    .txt16 p{
        color: #333333;
        font-family: Arial,Helvetica,sans-serif;
        font-size: 16px;
        line-height: 120%;
    }
  • #6 / Jan 24, 2012 8:09pm

    Isthmos

    20 posts

    Thanks for help

    well now the font size is proper but there is no separation in the paragraphs.

    Look here the text of the article

    http://www.isthmos.com/index.php/article/bouije_to_twitter_gia_ton_…adiabasto_chrusochoidh

    Any suggestion?

  • #7 / Jan 24, 2012 8:13pm

    Barrel

    92 posts

    You just need to add a bottom margin to the p:

    margin: 0 0 20px;
  • #8 / Jan 24, 2012 8:34pm

    Isthmos

    20 posts

    Well not it works.

    Thank you Barrel so much for your time and your help!!

  • #9 / Jan 29, 2012 12:54pm

    Sean C. Smith

    3818 posts

    Isthmos,

    Just want to be sure that everything is working now? There seems to be a typo in your last post - I suspect that not should be now. Is there anything else I can assist you with?

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases