Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

98
Visualizações
stretching component using left and right in react native

I'm trying to stretch my <View> component using left and right

I know how to do it in html and css:

.testing{
  background-color: orange;
  position: absolute;
  left: 100px;
  right: 20px;
}
 <div class="testing"> 
  Hello there
 </div>

but how do I achieve the same result in react native?

Edit
I tried this but it doesn't work:

export default function App() {
  return (
    <View style={styles.container}>
      <View style={{ left: 100,right: 20,height:50,position: 'absolute', backgroundColor: 'orange'}}><Text>hello there</Text></View>
    </View>
  );
    }
    
    const styles = StyleSheet.create({
      container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
      },
    });
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I tested your code and it's working for me. Try reinstalling and pasting your code in a new project

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda