Hi, am I missing something or there is a problem when using "size" property of "inputText" component?
When the size is specified using style="width: ??px;" the width is fine but when using only "size" - the component appears wider in Chrome.
The project is created in NetBeans 7.4 as default Web Application with JSF and PrimeFaces and the only thing I've added is the inputText.
You can see the difference here:
Here is the code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
Hello from Facelets
<br />
<h:link outcome="welcomePrimefaces" value="Primefaces welcome page" />
<br />
<h:form>
<p:inputText size="15"/>
</h:form>
</h:body>
</html>
Thanks.
Input components width is different between IE/Chrome
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
This is because different browsers do different things. Use css rules to control the width of input components only.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
don't blame PF, blame M$, Mozilla, G00gle etc...
https://www.google.nl/search?q=html+inp ... ifferences
https://www.google.nl/search?q=html+inp ... ifferences