Restrict the width of the border bottom


The above horizontal line is a Border-bottom CSS property. Is there no way to restrict the width of this line(border-bottom).

Hi there codeispoetry,

do you think that you may have you left something out ? :shifty:


Hi there @coothead, I dont understand your question actually. This is the code that I used:

border-bottom: 2px solid #868484;

Without all the relevant code for the your problem,
we can only guess at solutions to solutions to it. :wonky:


Ok. I will create a code pen for this.

Hi there codeispoetry,

here is a guess…

<html lang="en">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">

<title>untitled document</title>

<!--<link rel="stylesheet" href="screen.css" media="screen">-->

<style media="screen">
body {
    background-color: #f9f9f9;
    font: 100% / 162% BlinkMacSystemFont, -apple-system, 'Segoe UI', roboto, helvetica, arial, sans-serif;

h1  {
    padding: 0.5em;
    background-color: #fff;

h1 span {
    display: inline-block;
    padding-bottom: 0.75em;
    border-bottom: 2px solid #868484;
    font-weight: normal


 <h1><span>Browser compatibility</span></h1>



1 Like

Now I do not want that border bottom should be that wide.

Hi there codeispoetry,

so you have now resolved your problem ? :winky:


1 Like

You are nice. Great learning for the day. Thank you. You always have +ve Karma for sharing your knowledge.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.