Enhance the vertical size of IcoFont

This code snippet includes CSS for styling a navbar, as well as HTML and Angular directives for creating navigation elements.

If you're looking to center the <li> tags within the <nav> elements and increase the size of their IcoFont icons, you can try adding the icofont-4x class to the <i> tag.

HTML Code:

// JavaScript Libraries
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/js/bootstrap-datetimepicker.min.js"></script>

// Stylesheets
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.7.14/css/bootstrap-datetimepicker.min.css">

<div class="row">
  <div class="col-xl-12 col-lg-12 filter-bar">
    <nav class="navbar navbar-light bg-faded">
      <ul class="nav navbar-nav">
        // Navigation Items
      </ul>
    </nav>
    <nav class="navbar navbar-light height bg-faded m-b-30">
      <ul class="nav navbar-nav">
        // More Navigation Items
      </ul>
    </nav>
  </div>
</div>

CSS Styling:

.navbar.height {
    min-height: 180px;
}

.navbar.height .nav.navbar-nav {
    min-height: 80px;
}

.navbar.height .nav.navbar-nav .nav-item {
    min-height: 80px;
}

.navbar.height .nav.navbar-nav .nav-item a {
    min-height: 50px;
}

Answer №1

Give this a shot:

.nav-item .icofont{
  font-size: 30px;
}

Answer №2

To horizontally center li elements, apply justify-content-center to the nav.


If you want to adjust the font-size of a specific element, you will need to utilize CSS.

.font-25px {
  font-size: 25px;
}
<i class="icofont icofont-building font-25px"></i>

.font-25px {
  font-size: 25px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css" rel="stylesheet"/>
<div class="row">
  <div class="col-xl-12 col-lg-12  filter-bar">
    <nav class="navbar navbar-light bg-faded justify-content-center font-25px">
      <ul class="nav navbar-nav">
        <li class="nav-item ">
          <a class="nav-link icon-list-demo" data-toggle="tab" [routerLink]="['/franchise/customer']" role="tab" aria-expanded="false" ngbTooltip="Home">
            <i class="icofont icofont-home"></i>Home
          </a>
          <div class="slide"></div>
        </li>
        <li class="nav-item" *ngIf="jwtHelperService.isRole(['globaladmin','globaladminro','franchiseadmin'])">
          <a class="nav-link text-muted" href="javascript:;" (click)="custBranch1.show()" title="Create New Branch">
            <i class="icofont icofont-building"></i>New
          </a>
        </li>
      </ul>
    </nav>
    <nav class="navbar navbar-light height bg-faded m-b-30 justify-content-center font-25px">
      <ul class="nav navbar-nav">
        <li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
          <a class="nav-link icon-list-demo" data-toggle="tab" [routerLink]="['/franchise/customer/details/dashboard']" role="tab" aria-expanded="false" ngbTooltip="Dashboard">
            <i class="icofont icofont-chart icofont-4x-pie-alt text-muted"></i>Price
          </a>
          <div class="slide"></div>
        </li>
        <li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
          <a class="nav-link icon-list-demo" data-toggle="tab" [routerLink]="['/franchise/customer/details/dashboard']" role="tab" aria-expanded="false" ngbTooltip="Dashboard">
            <i class="icofont icofont-chart-pie-alt text-muted"></i>Product
          </a>
          <div class="slide"></div>
        </li>
      </ul>
    </nav>
  </div>
</div>

Answer №3

To center the list items

1) Ensure that both .nav-item and .nav have display: inline-block;

2) Set .navbar to have text-align: center

.nav-item, ul.nav {
  display: inline-block;
}
.navbar {
  text-align: center;
}

If you want to adjust the size of the icon, simply increase the font-size

i.icofont {
  font-size: 20px; // Adjust as needed
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Neglect the styling of the element wrapper

Imagine I have two divs set up like so: <div name="parent" style="color:blue;padding:5px"> <div name="child" style="background:red"> Text that disregards the color:blue and padding:5px properties, yet still follows the background:red set ...

What steps can I take to stop AngularJS2 from generating an error when the server sends a 410 (gone) response?

When using my AngularJS2 application to delete a resource, the server responds with a 410-GONE status code. However, AngularJS2 interprets this as an error. How can I configure AngularJS2 to recognize that a 410 response is valid? Here's a snippet of ...

Issues with image display on Firefox

I'm facing a major issue with my website (check it out here), where some users are unable to view images using Firefox. Interestingly, I personally use Firefox and have not encountered this problem. The affected users are on Firefox 3.5.2 running Win ...

Tips for effectively arranging images in a spiral formation

I'm striving to replicate the layout showcased in this screenshot : https://i.sstatic.net/RBg62.jpg My attempt involved utilizing columns with bootstrap 4. Initially, the layout appeared intact, but the elements being within a container-fluid caused ...

Identifying the class of a clicked button using Jquery

Currently, I am experiencing an issue with my code $(document).ready(function(){ $(".follow-button").click(function(){ alert("asdf"); } }); <button class="follow-button" align="right" align="center"> Follow </butt ...

Leveraging Attr Jquery

I find myself in a perplexing situation My attempt to insert a button into a div with a specified width has hit a roadblock $('#main').append('<button id="hello" type="button" style="width:100px">Click Me!</button>'); Des ...

Tips for populating fields with constant data and clearing sections upon clicking with angular2

I have defined emergency as static data in TypeScript. Now, I want to populate this static data into two sections. Can someone please advise me on how to achieve this or provide relevant links? I am still learning about reactive forms so any help would be ...

Avoid using CSS browser prefixes when selecting plugins or addons

I tried searching on Google for a solution, but I couldn't find anything! Is there a trick or library available to avoid repeating CSS extensions for browsers? Instead of using -webkit-, -moz-, and -o- prefixes? -webkit-animation: NAME-YOUR-ANIMATI ...

Is it possible to receive real-time updates for a specific location in Cesium

I am currently developing a live tracking application using Cesium, and I'm encountering an issue with updating the point location on the map in real-time. Currently, my Cesium viewer successfully receives the data from the server in JSON format and ...

What is the process for fetching an object from Firebase?

Hello, I am relatively new to working with Angular and Firebase. I am currently facing an issue with retrieving a nested object from Firebase. Below is my code snippet. Controller var rootRef = new Firebase('https://ayobacaalkitab.firebaseio.com/&apo ...

Selenium navigating an unordered list without returning the expected text

I'm currently in the process of developing a search bot for Craigslist using Selenium. I've managed to successfully iterate through the unordered list of search results, but unfortunately, I'm not able to extract the specific link text that ...

When you zoom in, the HTML elements tend to shift out of place

Spent the entire day yesterday attempting to make my page responsive while Zooming In, but I just can't seem to get it right. Even after adding height and weight, elements still get mixed up when zooming in on the page. I've scoured countless w ...

Utilizing NgStyle and Property Binding in Angular to Manipulate Data (or a Different Approach)

Currently, I am diving into Angular programming and encountering an issue with property bindings. Let me share a snippet of my code: // TS FILE data[ {"id": "1", "name": "tester", "rev": "1"}, {"id": "2", "name": "tester", "rev": "1"}, {"id": "3", "name" ...

MySQL Entry Update Failure

This is the HTML/EJS code snippet: <div class="Edit-Panel" style="display: none;"> <div class="Edit-Wrapper"> <div class="Editing"> <p class="Edit-Header ...

Is there a way in jquery or any other method that specifically detects changes only in direct child nodes?

I came across a jQuery method called DOMSubtreeModified that can detect the insertion of child nodes within a specific DOM. However, I noticed that this method detects the insertion of all child nodes, not just the immediate ones. Is there a jQuery met ...

Exploring ASP.Net Core features: IApplicationBuilder.Map for routing, serving SPA, and managing static

I am exploring the use of Asp.Net Core 2.2 to host my Angular application and handle API requests (on /api). In my Startup.cs file, specifically in the Configure method, I have configured it as follows: app.Map("/home", config => { ...

Creating a carousel with material design aesthetics

I'm working on implementing a carousel in my setup using Angular CLI: 6.0.5, Node: 10.1.0, OS: win32 x64, and Angular: 6.0.3. However, I haven't been able to locate documentation for creating the carousel in Angular's Material Design framewo ...

Swap out the div element with a loading.gif image right before the page finishes loading, then pause for 3 seconds before getting rid of

My challenge involves a select drop down that is being dynamically built. To handle this, I have implemented a setTimeout function to change the selected option after a 3-second delay. This allows the select element to load first before I manipulate it. Ho ...

Issue with automatic compiling in Sublime 2 for less2css

Whenever I try to save my style.less file, the automatic compilation doesn't happen. Is there a mistake in how I've set it up? Here's what is currently in my ox.sublime-project file: { "folders": [ { ...

Exploring the process of loading a new page in the browser through nodeJS

I'm a beginner looking to load a new page in the browser with just a button click. I've tried some code, but it's not working as expected. Here's what I have: NodeJS file: var http = require('http'); var fs= require('fs ...