amame02 Posted June 6, 2006 Share Posted June 6, 2006 (edited) Hi, I am trying to use the preforamatted text (pre) tag in my html page and the browser inserts a blank line every time it hits the <pre> tag. I wonder how I can avoid the additional blank line? Thanks.Example: <html><head><title>Header Info.</title></head><body>Preformatted Text test<pre> This is line 1</pre><pre> This is line 2</pre></body></html> Edited June 6, 2006 by aspnetguy Link to comment Share on other sites More sharing options...
scott100 Posted June 6, 2006 Share Posted June 6, 2006 I wonder how I can avoid the additional blank line? Thanks.Add margin:0; like so, that will bring them together. <html><head><title>Header Info.</title><style>pre{margin:0;}</style></head><body>Preformatted Text test <br /><pre> This is line 1</pre><pre> This is line 2</pre></body></html> Link to comment Share on other sites More sharing options...
amame02 Posted June 6, 2006 Author Share Posted June 6, 2006 Hi, I am trying to use the preforamatted text (pre) tag in my html page and the browser inserts a blank line every time it hits the <pre> tag. I wonder how I can avoid the additional blank line? Thanks.Example:<html><head><title>Header Info.</title></head><body>Preformatted Text test<pre> This is line 1</pre><pre> This is line 2</pre></body></html> <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
amame02 Posted June 6, 2006 Author Share Posted June 6, 2006 Thanks a lot scott100. It did it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now