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


Bringing HTML elements into one line



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 >


        //--</ @SubFolders >--



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


Output to HTML


Each link is output to its own line in the browser

Bringing HTML elements into one line


Division into a series

Through the css style combination


the HTML elements are displayed in one line


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


Bringing HTML elements into one line

Software Entwicklung Stuttgart Nürtingen
Suche Projekte C#, WPF, Windows App,ASP.Net, vb.Net, WinForms, SQL Server, Access, Excel