SVG Clip Path Issue

https://i.sstatic.net/p8f1L.png

The SVG I have positioned is within a container covering the bottom 40% of the page. This setup is intentional as the lower portion of the image is not needed. However, this positioning causes the SVG to be cut off near the text. Despite attempting to use overflow: visible;, the issue persists. Are there any other solutions I should explore? Here's the relevant code snippet:

HTML (Using Bootstrap):

    <header class="h-60 w-100 text-white hidden">
    <div class="container-fluid h-100 w-100">
        <div class="row h-100">
            <div class="container d-flex align-items-center justify-content-center w-100 h-100">
                <div class="col text-center w-100 heading">
                    <h1 class="reveal0">Ambrosia<h1>
                    <h3 class="reveal5">An Open-Source Website Theme</h3>
                    <br>
                    <a href="https://jaidevshriram.com" class="btn btn-light reveal15">See My Other Work!</a>
                </div>
            </div>
        </div>          
    </div>
</header>

<div class="container-fluid h-40">
    <div class="row h-100">
        <div class="container d-flex align-items-center justify-content-center h-100">
            <div class="col h-100 w-100 pic1">
            </div>
            <div class="col">
            </div>
        </div>
    </div>
</div>

CSS:

    .hidden {
    overflow: hidden;
}

.pic1 {
    position: fixed;
    background: url("../img/pic1.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-size: cover;
    display: block;
    margin: auto;
    overflow: visible!important;
}

Answer №1

Try implementing either of the following options:

background-size: contain

This will reduce the size of your image without cropping it.

Alternatively, you can use:

background-position: top

This will cut off the bottom of the image instead of the top.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having issues with PHP not displaying your SQL query results?

Can someone lend a hand? I'm attempting to add some content as per the requirement of stackoverflow for more text instead of just code. ...

What is the process for incorporating the index of a string within a list into a fresh set of double values?

For example: We have a text file loaded into a list called r r = ['John is american', 'Bea is french', 'John is american', 'Ray is german', 'John is american', 'Bea is french', 'Bea is fren ...

Transferring information via Segments in Ionic 3

I'm facing a challenge where I need to transfer a single ion-card from the "drafts" segment to the "sent" segment by simply clicking a button. However, I am unsure of how to achieve this task seamlessly. Check out this image for reference. ...

When I retrieve the MySQL entry in my HTML using PHP, it only displays the first word

I've explored other discussions on this topic, but they all focus on echoing data from within the PHP section of the code. I'm attempting to accomplish this in the HTML part. Currently, it only displays the first word of the target. How can I re ...

Validation of forms in Bootstrap 4

I am new to utilizing bootstrap and have come across numerous form validation plugins for bootstrap 3, but I am unable to find any compatible with bootstrap 4. My goal is to implement validations on multiple forms. Here is the code snippet I have been wor ...

What is the best way to center my image on a webpage without having it overlap with the text using HTML and CSS?

I'm struggling to center and make my image responsive without causing text overlap. How can I resolve this issue? Check out the problem here div.shadow { position: absolute; max-width: 45%; max-height: 45%; top: 50%; left:50%; ...

Bootstrap for handling screen rotation and responsive design

Utilizing bootstrap to showcase canvas thumbnails within a div for lighter client-side creation. While not the perfect design, it's functional. An issue arises when viewing the app on a mobile device in portrait mode - the col-xs-6 class remains fixe ...

Looking to align a radio button in the middle of an inline-block?

Is it possible to center a radio button within an inline-block? I have provided a demo on JSFiddle that displays the current layout and how I envision it should appear. Check out the demo here Here is the code snippet in question: <span style="widt ...

I am encountering a "405 Method Not Allowed" error in my Python code on Google App Engine. What could be causing this issue?

I'm new to programming in python and I'm attempting to create an application by following the steps taught in my recent class, but I keep encountering the "405 Method Not Allowed" error. Here is what my professor did: This is what I have done: ...

Do we need to use aria-labelledby if we already have label and input associated with "for" and "id"?

Here is the HTML structure for the Text Field component from Adobe Spectrum: The <label> element has a for attribute and the <input> has an id which allows screen readers to read out the label when the input is focused. So, why is aria-label ...

Explain the usage of bootstrap col-md-** without resorting to inline styling

Consider the example below <html> <head> </head> <body> <div class="col-xs-12 col-sm-12 offset-md-4 col-md-4 offset-lg-4 col-lg-4"></div> <div class="col-xs-12 col-sm-12 offset-md-4 col-md-4 offset-lg-4 col-lg- ...

Adjust image loading according to screen dimensions

I am working on HTML code that currently displays an image. The code looks like this: <div> <img id="wm01" alt="PP" title="PP" u="image" src="theImages/wm01.jpg" /> </div> My goal is to show a different image based on the screen si ...

Link Javascript .append() variable to PHP variable

How can I save the 'money' variable from JavaScript as a PHP variable on the same page? JS $(document).ready(function(){ var money = 0; $(".target").change(function () { var optionSelected = $("option:selected", this); money = optionSelected.a ...

Hide elements in hidden divs until the page is fully loaded to reduce initial page

www.prismasites.com I am creating a unique world map by using SVG DIVs shaped like Continents. Upon clicking on a continent on the world map, it conceals the world map DIV and displays the respective continent DIV with SVG. I have successfully achieved ...

Is it possible to access a local excel file by using a file URL that contains a space within it?

Issue: I'm encountering difficulty opening a local Excel file via a file URL when the directory containing the file has spaces in its name. In my scenario, I have an HTML file with a link that should open a local Excel file from the same directory. T ...

Utilizing Node-Red: Linking an External CSS File with HTML Elements

If there are any resources on this particular topic available on the Node-Red website, please share them with me. My current project involves building a static website using HTML, JavaScript, and CSS with Node-Red. I am utilizing HTTP GET nodes to call my ...

Is it possible for a parent element to inherit the margin of a child element in HTML and

strong text It's puzzling to me why my header shifts downward when I add a margin-top to its child element (.navigation). When I apply padding, the header remains at the top. Can someone please explain why this happens? I've read that setting ov ...

Creating a floating div that remains in place without disturbing the layout of the surrounding elements on

I am trying to place a div within a page at specific coordinates without affecting the rest of the content on the page. My initial approach was to give the parent container a position: absolute and the floating div a position: relative, then setting the p ...

Issues with jQuery .on('click') arise when employing absolute positioning

I am currently working on a website project where I have implemented a popup element with a dark backdrop. However, the issue I am facing is that when clicking within the popup itself, it also triggers the fade-out effect instead of just when clicking on t ...

What could be causing circletype.js jquery to malfunction?

Can someone assist me in figuring out why this is not functioning properly? I have meticulously verified that the js files are connected correctly. Is there something glaringly obvious that I am overlooking? I followed the instructions exactly as they we ...