Line Breaks
I wanted to put a quick post about line breaks here. There are many people that will probably never run into this problem, but occasionally line breaks will display wrong on a website, even though it looks fine in Dreamweaver or on a local machine. For example, you may see two line breaks where there is only supposed to be one. This is caused by the way that different operating systems encode line breaks. Essentially it breaks down to one of three options: Windows, Mac, or UNIX.
As with most things, Windows uses a weird line break code that looks like (CR LF), which is "carriage return" and "line feed" abbreviated. Macs use just the CR code. Unix machines use only the LF code. So you may sometimes see files that were created with Windows showing two line breaks, as the displaying computer finds that code. It seems complicated, and it is a bit considering that we are just talking about a line break. However, I wanted to post about it because there is a simple way for web designers using Dreamweaver to resolve this. If you go to the preferences in Dreamweaver, there should be a tab (or section) entitled "Code Format". Under that section you will see a drop-down menu for line breaks. Since our site is hosted on a UNIX server (like most websites), I have mine set to use UNIX line breaks.
So far this has been the fix for any line break issues that I have not been able to figure out, and I thought it might help someone else.
This post is filed under Developers' Corner and has the following keyword tags: unix, windows, apple, dreamweaver.