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.

Firebug finds a tag that I can't see elsewhere...

June 16, 2010 1:56am

Subscribe [2]
  • #1 / Jun 16, 2010 1:56am

    Belarga

    30 posts

    Friends @ EE Forums
    I used:

    {exp:channel:entries channel="descripcion_belarga" limit="4" status="open" orderby="numero_entrada" sort="asc|desc"}
    <div class="que_hacemos" id="{switch="estrategia|contenido|disenno|analisis"}">
    <h2 id="{switch="estrategia|contenido|disenno|analisis"}">{title}</h2>
    {descripcion_entrada}
    </div>
    {/exp:channel:entries}

    And the information comes perfect. But I saw a space above the first

    that seem to be out of place and it was not a CSS error. So I went to Firebug and found a lonely:

    The {switch} is working perfect but I can’t reach that

    to erase it. The Costum Field on that Channel has no information above that first paragraph.

    On the attached file you can see why I used that option: each column has different bgcolor, type color, etc.

    Thanks for the help!

  • #2 / Jun 16, 2010 6:49am

    Neil Evans

    1403 posts

    have a look at the field formatting - and see if it is set to XHTML or similar. That might wrap the text in P tags. In your custom field setup.

    Also if you using a WYSIWYG editor then these are not well known for producing good HTML code. Therefore there might be mistakes in it that the browser is trying to fix (by adding the opening P tag).

    However, i suspect it is the first problem. N

  • #3 / Jun 16, 2010 10:52am

    Belarga

    30 posts

    Nevsie, thanks!
    It worked and the lonely tag disappeared. I changed XHTML to none and auto br. But I don’t see why a Paragraph should be created using a pair of breaklines… It doesn’t seem very semantic. I’m using CODA and try to grow the best HTML code that I can so it’s weird to use such a trick in order to create a paragraph.

    Any ideas?

  • #4 / Jun 16, 2010 10:59am

    Neil Evans

    1403 posts

    not 100% sure what settings you had where and what the field types and settings were etc…
    But each have their own purpose and need for outputying text.

    For example “none” is appropriate if you have a WYSIWYG editor.
    AutoBR is great if you just want to keep the return lines in raw text, no HTML.
    XHTML can nicely wrap up things like single sentences or lines of text if used for a summary. (and save you having to wrap it on output at the template side)

    Personally 90% of the time i use “none”. The docs or others might help you for more thoughts.

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

ExpressionEngine News!

#eecms, #events, #releases