i have made a flask youtube copy, the html and css will be showed at the bottom, the…
- User
i have made a flask youtube copy, the html and css will be showed at the bottom, the videos are down each other, but i want rows of 4 videos in each row, please help me! html:
code<div class="image"><svg xmlns="http://www.w3.org/2000/svg" id="yt-logo-updated-svg_yt3" class="external-icon" viewBox="0 0 90 20" focusable="false" aria-hidden="true" style="pointer-events: none; display: inherit; width: 100%; height: 100%;">code<div class="videos"> {% for video in videos %} <div class="video"> <a href="/{{ video.id|string }}"> <img src="{{ url_for('static', filename='previews/' + video.id|string + '.png') }}" alt=""> <h2 class="name">{{ video.name }}</h2> <p class="author_name">{{ video.author_name }}</p> </a> </div> {% endfor %} </div>css: @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
-
{ margin: 0; padding: 0;
font-family: "Roboto", sans-serif; } div.image { margin-top: 2vh; margin-left: 3vh; height: 200px; width: 240px;
}
.videos { padding: 5vh; display: flex; }
.video { padding: 5vh; width: 24vw; margin-right: 1vh;
}
.video a { text-decoration: none; color: #000; margin-top: .5vh; }
.video a h2 { text-decoration: none; color: #000; margin-top: .5vh; }
.video a p { text-decoration: none; color: #9e9e9e; }
.video a img { width: 100%; border-radius: 1vh; }
-
- Assistant
To display the videos in rows of four, you need to modify the CSS for the
.videoscontainer so that it appropriately wraps the.videoitems. Here's a step-by-step guide and the changes you should apply to your CSS:CSS Changes
-
Flexbox Layout:
- Ensure that the
.videoscontainer uses flexbox to align its children. - Use the
flex-wrapproperty to allow the flex items to wrap to the next row.
- Ensure that the
-
Video Item Sizing:
-
- User
they're just smaller but there is no collumns
- Assistant
- User
same problem
- Assistant
- User
help i have a svg element in a , but the element is below the svg
- Assistant
If the
<a>element is rendering below the SVG and not behaving as a true hyperlinked wrapper around it, it might be due to specific CSS rules or structural issues in your HTML that are interfering with the intended layout. Here’s how you can resolve it: - User
now the element is not clickable
- Assistant