-1

when i use it at my browser it goto left and can't center it with anyway like text-align or flexbox or anything it can be fixed when i remove the width but i need it to give the paragraph look that i want

.pragraph  {
    position: absolute;
    width: 1300px;
    height: 182px;
    left: 30px;
    top: 699px;
    line-height: 65px;
    text-align: center;
    
    
}
.pragraph p {
    position: absolute;
    font-size: 40px;
    font-family: 'Peddana', serif;
    text-align: center;
    width: 100%;
    
    
}
<div class="pragraph">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sapien diam, eleifend eu fringilla auctor, laoreet et elit. Phasellus efficitur posuere dui vitae laoreet. Phasellus</p>
</div>

1 Answers1

0

.pragraph  {
    position: absolute;
    width: 1300px;
    height: 182px;
    left: 0;
    right: 0;
    top: 699px;
    line-height: 65px;
    text-align: center;
    margin: auto;
    
}
.pragraph p {
   
    font-size: 40px;
    font-family: 'Peddana', serif;
    text-align: center;
    width: 100%;
    
    
}
<div class="pragraph">
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sapien diam, eleifend eu fringilla auctor, laoreet et elit. Phasellus efficitur posuere dui vitae laoreet. Phasellus</p>
</div>
Aman Sharma
  • 933
  • 1
  • 4
  • 12