I have a problem on placing my image over the border of my view or div. I tried to add position absolute and use top property but doesn't worked. here's my code:
const Card = () => {
return (
<View style={styles.mainContainer}>
<View style={styles.imageContainer}>
<Image style={styles.mainImage} source={require('../assets/Img/office.jpg')} />
</View>
<View style={styles.locationContainer}>
<View style={styles.textContainer}>
<Text style={styles.mainText}>Welcome to the finest future of business</Text>
</View>
<View style={styles.locationContainer}>
<Text>location</Text>
</View>
</View>
</View>
)
}
const styles = StyleSheet.create({
mainContainer: {
width: '100%',
height: 300,
borderRadius: 30,
// overflow: 'hidden',
borderWidth: 4,
borderColor: '#EDF1F2',
},
imageContainer: {
height: '70%',
},
mainImage: {
width: '100%',
height: '100%',
borderRadius: 30,
}
})
here is the goal:
here is my code result:

