• It’s happening to me a very strange thing that cannot solve. I have modified the single.php file to show only the word “hello” inside the loop.

    <?php while (have_posts()) : the_post(); ?>
        <div class="special">
            hello
        </div>
    <?php endwhile; ?>

    the css for this class is:

    #content .special {
    	line-height: 1.4em;
    	color:red;
    	vertical-align: top;
    	padding: 0;
    	margin: 0;
    	border: 1px solid red;
    	width: 50px;
    	}

    The strange thing is that the word “hello” has a space at the end, before the post finish (¿?¿)
    See this image to see what I’m talking about

    Where is this space comming from? Looking at the html code generated thereis not a ” “

    <div id="content" class="narrowcolumn" role="main">
        <div class="special">
    	hello
        </div>
        <div class="special">
    	hello
        </div>
        <div class="special">
    	hello
        </div>
        <div class="special">
    	hello
        </div>
        <div class="special">
    	hello
        </div>
        <div class="special">
    	hello
        </div>
        <div class="special">
            hello
        </div>
    </div>

    I cannot find any right padding for any class or div that may affect this portion of code.
    Is it possible that wordpress adds this by default?

    Any help would be very appreciated.
    Thankyou for your time.

    PS: Sorry to post this question twice but the first time I chose the wrong subforum and thought this could be a better one.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Strange space  added by wordpress?’ is closed to new replies.