Progress bar not filling entire div

I have a div at the top of the page that shows a global progress bar.  The div is taking up 100% of the page and a specified height (green).  I want the progress bar to take up the entire region, but it appears it has some sort of non-adjustable margin and/or padding.  I've messed with the width/height/progressthickness, etc to no avail.

blazor_progress_bar.jpg


3 Replies

DG Durga Gopalakrishnan Syncfusion Team March 9, 2022 09:18 PM UTC

Hi Jeff,


Greetings from Syncfusion.


We suggest you to increase the ProgressThickness and TrackThickness to increase the height of progress bar. By default width will be inherited to its parent element width. We have prepared sample based on your requirement.


@using Syncfusion.Blazor.ProgressBar

<div style="height:100px;width:600px">

<SfProgressBar @ref="ProObj1" Type="ProgressType.Linear" ProgressThickness="100" TrackThickness="100" Value="50" Minimum="0" Maximum="100">

                <ProgressBarAnimation Enable="true" Duration="2000" Delay="0" />

            </SfProgressBar>

</div>


Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ProgessHeight761841981.zip


Kindly revert us if you have any concerns.


Regards,

Durga G.



JV Jeff Voigt March 9, 2022 09:30 PM UTC

Thank you for the update.  While the height adjustments you suggested do help, it is still impossible to fill the entire green area.  If you just have a div with no margin and/or padding and you place the progress bar within it, how is one supposed to fill up the entire width?  The parent div is set to 100% so I can't set the progress bar width to 110%... 

I'm wondering why the control seems to have a built-in margin and/or padding without any css telling it so.



DG Durga Gopalakrishnan Syncfusion Team March 10, 2022 05:39 PM UTC

Hi Jeff, 

We request you to specify Margin Left and Right value as 0 to display progress bar in  parent element width. We have attached modified sample for your reference. Please check with below snippet and sample. 

<div style="background:green;border:3px solid red;height:100px;width:100%"> 
              <SfProgressBar > 
                             <ProgressBarMargin Left="0" Right="0" Top="0" Bottom="0"></ProgressBarMargin> 
              </SfProgressBar> 
</div> 

 


Please let us know if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon