Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter Six. HTML Tips & Tricks > Getting Rid of Weird Spacing Issues

Getting Rid of Weird Spacing Issues

There will be times when you copy-and-paste text into the Visual tab on the WordPress Add New Post page, and the spacing of everything will look just a little bit off. Adding and removing spaces in the Visual tab, though, doesn’t make any changes to anything.

Step One.
If you copy-and-paste some text into the Visual tab and the spacing isn’t quite right, switching to code view always helps correct the issue. When you paste text, chances are the Visual tab has placed random <P> and <div> tags in your text, causing the spacing problems. Whenever I type in my content into the code view in the HTML tab, I never use any <div> or <P> tags. I just type in my content and press the Enter (Mac: Return) key when I need a new line. Those <div> and <P> tags are just excessive.

Step Two.
Keep in mind, however, that if you remove a <P> tag from the HTML tab code view, there will most likely be a </P> tag. Make sure you check the content and get rid of that one, too. The same goes for the <div> tags. (Note: The only exception here is if the <div> tag happens to have a class attribute, which will start with “class=.” Chances are if it does, it’s performing some formatting function.)


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint