I'm relatively new to web development, and using bootstrap has been an absolute lifesaver, but I've been trying to make a carousel for my website, and I can't figure out how to make it not stretch across the whole page. I just want to display some pictures in one of the corners of the page, but since the carousel is stretched to each side the picture is always off and I can't put anything next to it... Any help would be greatly appreciated!
Asked
Active
Viewed 226 times
1
-
Can you show your code? – Kingsley Uchenna Nov 18 '21 at 22:14
2 Answers
2
Make sure to use class="container"
for your main content.
<body>
<div class="container">
<!-- Your contents here -->
</div>
</body>

miftahulrespati
- 494
- 4
- 16
0
Try putting a margin or padding around it. If you want to center an image in the Carousel you can do a marin:auto; which should clear it up. I was having trouble with it earlier because it is rather small. In my website in the "Home" and "Artworks" my images are intended to be small if your images are too small make sure they are at 100% because it gets funky. https://codehs.com/editor/html/417421/2890338/1029154551/index.html
-
1Whilst this would work, I recommend not adding padding or margins to your CSS with Bootstrap as Bootstrap does have it's own padding and margins built in. Here is the info. https://getbootstrap.com/docs/5.0/utilities/spacing/ – Cutey from Cute Code Nov 19 '21 at 07:45