Border and margin issue
Page Border I encountered an issue when trying to apply a page border with a margin. The Right border of the page disappeared when applying the margin, and I noticed that the page shifted to the right when applying the margin.
the code applied:
const baseStyles = StyleSheet.create({
page: {
paddingVertical: 10,
paddingHorizontal: 10,
/* border: "1px solid #606060" */
margin:10,
borderColor: '#606060',
borderWidth: '2pt',
borderStyle: 'solid',
}})
please any example or suggestion to solve this issue?
Page margin does not make any sense, as there's nothing outside of it. Keep the page padding, and add the border to a View inside of it
Page margin does not make any sense, as there's nothing outside of it. Keep the page padding, and add the border to a View inside of it
Here's a clearer and more detailed version of the comment:
-
content misalignment: the page margin caused all content to shift rightward instead of maintaining proper alignment.
-
border rendering bug: when attempting to fix this by applying a border to the inner view element, the border failed to automatically adjust (not closed at the end of page) when new pages were dynamically added.
I recommend testing these margin and border behaviors in a live environment to verify.