Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

How can you format several links in a single line in HTML, so that there is no break on the entire width.

 

Concerns: Asp Core HTML Razor

 

 

 

In the following Asp Core Razor HTML code, folders are determined by a split with / and are to be output in an HTML div element

 

//---< Folder-Div >--->

<div >

    📂

    @{

        //--< @SubFolders >--

        string[] subFolders = item.Folder.Split('/');

 

        @foreach (var subFolder in subFolders)

        {

            //< SubFolder >

            string sURL_Folder = item.IDArticle.ToString();

            if (sQuery != "") { sURL_Folder = sURL_Folder + sQuery; }

 

            <a href="/📁/@subFolder" title="@subFolder" class="list_folder">

               @subFolder

            </a>

            //</ SubFolder >

        }

        //--</ @SubFolders >--

    }

</div>

//---< Folder-Div >--->

 

Output to HTML

 

Each link is output to its own line in the browser

 

Division into a series

Through the css style combination

display:flex;flex-grow;

the HTML elements are displayed in one line

 

<div class="list_Div_Row shadow-sm rounded" style="display:flex;flex-grow;">

 

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de