Jump to content
newcoder1010

How to draw a line in css

Recommended Posts

That's an image file, CSS can't do that. You can use the browser's inspector to see what styles the element has.

Share this post


Link to post
Share on other sites

Not entirely true, but problem is, this method is not responsive, you will have to adjust to different widths using media queries.

            .arrow-down {

                width: 0;
                height: 0;
                border-left: 750px solid transparent;
                border-right: 750px solid transparent;

                border-top: 5px solid #ccc;
                margin:20px auto;
                
            }


          <div class="arrow-down"></div>

The only other alternative other than an image, is to use svg.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×