gray Posted March 14, 2009 Share Posted March 14, 2009 I seem unable to centre just a few lines of text. Using the html editor, it centres all of the text. But in hard html coding it not only does not like it, but it also deletes the html code. Link to comment Share on other sites More sharing options...
rocky Posted March 16, 2009 Share Posted March 16, 2009 The <center> tag has been deprecated and shouldn't be used any more, so it is automatically stripped to maintain standards compliance. Use the following instead: Your text Link to comment Share on other sites More sharing options...
gray Posted March 16, 2009 Author Share Posted March 16, 2009 Yes that works, but the text editor and the text alignment button does not work. You have to manually enter the style code.Many thanks. Link to comment Share on other sites More sharing options...
rocky Posted March 16, 2009 Share Posted March 16, 2009 That's strange. I can't reproduce your problem.I created a page, entered some left-aligned text, then saved it. The text appeared left-aligned. I then edited the page and clicked the "Align center" button on the toolbar. The text appeared centred in the preview and on the webpage.When I click on the HTML view, it automatically entered the code I mentioned above for me. I didn't have to type it manually. Does this not work for you?Can you give us the code you are trying to edit? Link to comment Share on other sites More sharing options...
gray Posted March 17, 2009 Author Share Posted March 17, 2009 Here's a screenshot of the working html/textscreenshot1If I say now highlight a bit of text screenshot2and then select the centre button, this is what I now getscreenshot3If however I highlight the same text and select bold, I now getscreenshot4So the text editor nearly works, but not quite right. Link to comment Share on other sites More sharing options...
rocky Posted March 18, 2009 Share Posted March 18, 2009 I think I understand now.The only way I've been able to reproduce this problem is by using Shift+ENTER twice instead of ENTER to separate paragraphs. When clicking the Align Center button, this then causes both paragraphs to be centred, which to me is expected behaviour. You should only use one ENTER between paragraphs to create two separate tags instead of and then you will get the bahaviour you expect.If you are pasting this text from Word or somewhere else, you will need to make sure that you are not using Shift+ENTER between paragraphs, or if this can't be avoided, I guess you will have to manually delete the spaces between each paragraph and then press ENTER to put the right tags in.As far as I can tell, it is impossible to fix this, since it is impossible to know what the intent of the user was when separating paragraphs. Link to comment Share on other sites More sharing options...
rocky Posted March 18, 2009 Share Posted March 18, 2009 Oops, forgot to preview. I mean two separate tags instead of . 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