Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!