<div class="container">
<div class="content">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-5 col-lg-4 col-xl-4 order-lg-2 offset-xl-1 mb-4">
<div class="img-wrap text-center text-md-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
<div class="img">
<video class="img-fluid" autoplay="" loop="" muted="">
<source src="assets/img/about.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
</div>
<div class="offset-md-0 offset-lg-1 col-sm-12 col-md-5 col-lg-5 col-xl-4 aos-init aos-animate" data-aos="fade-up">
<div class="px-3">
<span class="content-subtitle">About Studio LSD</span>
<h2 class="content-title text-start">
Innovative storytelling rooted in creativity and excellence!
</h2>
<p class="lead">
Studio LSD is a vibrant Mumbai-based multimedia production house specializing in original storytelling for television and OTT platforms.
With a pan-India presence, we collaborate with talented individuals to create captivating and genre-defining content.
</p>
<p class="mb-5">
Our journey began with a mission to push the boundaries of storytelling, partnering with visionary creatives to develop shows that showcase
our craft. With years of industry expertise and a commitment to excellence, we've established ourselves as a go-to production house
for premium content creation.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Now, I want 'Laxmi | Saraswati | Durga' text written vertically (rotated at -90 degrees) on the left of .content element.
To display the text "Laxmi | Saraswati | Durga" vertically on the left side of the .content element, rotated at -90 degrees, you can follow these steps:
Add HTML for the Vertical Text
Style the Vertical Text with CSS
Ensure Responsiveness
Below are the detailed steps and code snippets to achieve this:
1. Add HTML for the Vertical Text
Insert a new <div> containing your vertical text within the .about section. Position it outside the .container but inside the .about section to ensure it sits correctly relative to the main content.
html
<section id="about" class="about section light-background">
<!-- Vertical Text Container -->
<div class="vertical-text">
Laxmi | Saraswati | Durga
</div>
<div class="container">
<div class="content">
<div class="row justify-content-center">
<!-- Existing Columns -->
<div class="col-sm-12 col-md-5 col-lg-4 col-xl-4 order-lg-2 offset-xl-1 mb-4">
<div class="img-wrap text-center text-md-left aos-init aos-animate" data-aos="fade-up" data-aos-delay="100">
<div class="img">
<video class="img-fluid" autoplay="" loop="" muted="">
<source src="assets/img/about.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
</div>
<div class="offset-md-0 offset-lg-1 col-sm-12 col-md-5 col-lg-5 col-xl-4 aos-init aos-animate" data-aos="fade-up">
<div class="px-3">
<span class="content-subtitle">About Studio LSD</span>
<h2 class="content-title text-start">
Innovative storytelling rooted in creativity and excellence!
</h2>
<p class="lead">
Studio LSD is a vibrant Mumbai-based multimedia production house specializing in original storytelling for television and OTT platforms.
With a pan-India presence, we collaborate with talented individuals to create captivating and genre-defining content.
</p>
<p class="mb-5">
Our journey began with a mission to push the boundaries of storytelling, partnering with visionary creatives to develop shows that showcase
our craft. With years of industry expertise and a commitment to excellence, we've established ourselves as a go-to production house
for premium content creation.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
2. Style the Vertical Text with CSS
Add the following CSS to position and rotate the text appropriately. This CSS ensures that the vertical text is positioned to the left of the .content area, rotated at -90 degrees.
css
/* Ensure the .about section is positioned relative to contain the absolute child */
.about {
position: relative;
}
/* Style for the vertical text */
.about .vertical-text {
position: absolute;
top: 50%;
left: -80px; /* Adjust this value based on desired spacing */
transform: translateY(-50%) rotate(-90deg);
transform-origin: left top;
font-size: 16px; /* Adjust as needed */
color: var(--default-color);
white-space: nowrap;
/* Optional: Add some padding or background if needed */
/* padding: 10px; */
/* background-color: rgba(255, 255, 255, 0.8); */
}
/* Responsive Adjustments */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
.about .vertical-text {
display: none; /* Hide on smaller screens to prevent overlap */
}
}
Explanation of CSS Properties:
position: absolute;
Positions the .vertical-text relative to the nearest positioned ancestor (.about in this case).
top: 50%; left: -80px;
Vertically centers the text and positions it to the left. Adjust left to control horizontal spacing.
transform: translateY(-50%) rotate(-90deg);
Centers the text vertically and rotates it by -90 degrees.
white-space: nowrap;
Prevents the text from wrapping to multiple lines.
@media Query:
Hides the vertical text on screens smaller than 992px (typically tablets and mobile devices) to ensure a clean and responsive design.
3. Ensure Responsiveness
The media query in the CSS above hides the vertical text on smaller screens to prevent layout issues. If you prefer to keep the text visible but adjust its position or size on different devices, you can modify the media query accordingly.
Ensure that your final CSS includes both your existing styles and the new styles for the vertical text. Here's how the complete CSS might look with the new additions:
Adjusting left Value:
The left: -80px; positions the text to the left of the .content area. You may need to adjust this value based on your specific layout and padding.
Z-Index Issues:
If the vertical text overlaps other elements undesirably, you can adjust the z-index property:
Accessibility:
Ensure that the rotated text maintains good contrast and is readable. Avoid using small font sizes that may hinder readability.
By following these steps, you'll successfully add vertically rotated text to the left of your .content element within the .about section. Adjust the CSS values as needed to fit your design preferences and ensure a responsive, user-friendly layout.