WordPress.org

Ready to get started?Download WordPress

Forums

White space appearing in source code (3 posts)

  1. BrowserMedia
    Member
    Posted 8 years ago #

    I have been using WordPress on the http://www.browsermedia.co.uk website and think it is fantastic. 100% recommendation as it is an excellent way to manage a site.

    One issue I have found and is baffling me is the addition of white space in the source code. It seems to add several lines of white space after a list -
    '

  2. '
    Whilst not a huge problem and the code is still valid, the perfectionist in me wants to get rid of it and I would be very grateful if anyone else has seen a similar issue and knows a fix.

    Many thanks in advance,
    Joe

  • Mark (podz)
    Support Maven
    Posted 8 years ago #

    The whitespace you see is added by the browser.
    If you left aligned every single bit of code in every single file you would still get indentation somewhere.
    It costs no bandwidth, if you are looking at source you expect it to be there, if you've never looked at source you'll not know any different and the amount of work needed to achieve this is off the scale compared to the gain.
    We have had the odd post here before about this and no-one has yet achieved it - especially when you consider that different browsers handle things in different ways.
    Also bear in mind that your posts would indent anyway ...

  • BrowserMedia
    Member
    Posted 8 years ago #

    Fair enough - I agree that it isn't the end of the world by any stretch of the imagination.

    I don't mind some white space but was worried that I may have done something wrong to get the 10+ lines that I get.

    Thanks for the help.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags