0

How can I prevent linebreak in the following?

<h1><h:outputText value="sometext" style="text-align: left"/></h1> <h:commandButton value="sometext style="text-align: right" /> 

2 Answers 2

1

I think you need to put into context (maybe a small picture showing what you want to achieve?). Otherwise, try float instead of text-align.

style="float: left" style="float: right" 
Sign up to request clarification or add additional context in comments.

Comments

0
<h1><h:outputText value="sometext" style="text-align: left"/> <h:commandButton value="sometext style="text-align: right" /></h1> 

H1 is a block level element, unless otherwise defined in the styles.


Also note you are missing a closing ". It should be..

<h1><h:outputText value="sometext" style="text-align: left"/> <h:commandButton value="sometext" style="text-align: right" /></h1> 

Don't be afraid to try a validation service, they don't bite.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.