Eduardo
Eduardo

Reputation: 1199

Primeflex - Responsive design not working in mobile screen

I'm trying to use primeflex to design my web as a responsive application.

When I test my application in my computer, it works well. But when I test my application in my mobile phone, it doesn't work well. It should paint the field one below the other, but it doesn't.

The design I would like is:

enter image description here

The code of the example is very easy:

<div class="formgrid grid">
                
            <div class="field col-12 md:col-6">
            
                <h:outputLabel  for="phone1" value="Phone 1:" />        
                
                <p:inputText id="phone1" maxlength="9" styleClass="w-full" />
                            
                                                                    
            </div>
            
            <div class="field col-12 md:col-6">
            
                <h:outputLabel  for="phone2" value="Phone 2:" />        
                
                <p:inputText id="phone2" maxlength="9" styleClass="w-full" />
                                                                                                        
            </div>
</div>

What is not working the responsive design on my mobile phone?

Upvotes: 0

Views: 2647

Answers (1)

Eduardo
Eduardo

Reputation: 1199

I forgot to use:

<meta name="viewport" content="initial-scale=1" />

That was all.

Upvotes: 1

Related Questions