Troubles with Semantic UI tab appearance

I followed the usage guidelines precisely as outlined on the Semantic UI page . I placed the tab.min.css file into my CSS folder and linked it correctly. However, when I view the page, it appears nothing like the Semantic UI tabs. Instead, it displays vertically with plain text like this:

Tab 1
Tab 2
Tab 3

Here is the code I am currently using on the page where the tabs should be displayed.

<script>$('.tabular.menu .item').tab();
</script>

<div class="ui tabular menu">
  <div class="item active" data-tab="ts-tab1">Tab 1</div>
  <div class="item" data-tab="ts-tab2">Tab 2</div>
  <div class="item" data-tab="ts-tab3">Tab 3</div>
  <div class="item" data-tab="ts-tab4">Tab 4</div>
  <div class="item" data-tab="ts-tab5">Tab 5</div>
  <div class="item" data-tab="ts-tab6">Tab 6</div>
</div>

<div class="ui tab active" data-tab="ts-tab1">
 example content
</div>

<div class="ui tab" data-tab="ts-tab2">
  example content

</div>
<div class="ui tab" data-tab="ts-tab3">
 example content

</div>
<div class="ui tab" data-tab="ts-tab4">
 example content

</div>
<div class="ui tab" data-tab="ts-tab5">
 example content

</div>
<div class="ui tab" data-tab="ts-tab6">
 example content

</div>

I'm at a loss here. I've been struggling with this for a day now and can't figure out what's wrong. Any help would be greatly appreciated!

Answer №1

During my exploration for a solution to the same problem in React, I came across this revelation. The issue stemmed from the absence of menu-related styles in the tab.min.css file, specifically needed for the tabular menu. Once I included the required menu classes in the CSS, the problem was successfully resolved.

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

Stop image resizing on bootstrap Card

Looking for a Card design featuring a non-resized image against a grey background that is larger than the image itself. Although I have managed to set up the background and insert my chosen image, I am struggling to stop the image from resizing. <div c ...

Refreshing a section of a webpage using AJAX and PHP

After creating a RESTful API in PHP, I can easily register information by accessing the address . This registration process involves sending a POST request. Below is an overview of my method: File: api.php <?php /* File: api.php */ private function ...

How to change from using position: sticky to fixed after scrolling to a specific div

Is there a way to transition the position of sticky content from sticky to Fixed while scrolling down and moving to the next rows, keeping it fixed until just before the footer, where it should scroll again? For example, <!DOCTYPE html> <html ...

How can you move away from using the url:port scheme with socket.io?

Recently, I've been delving into node.js and socket.io, but I'm struggling to eliminate the need to type "url:port" in the browser. Instead, I want users to simply enter the URL and have everything load up, similar to my work-in-progress single p ...

I am looking to create buttons that can switch between two different styles of a specific element, like an h1 tag, when clicked. However, instead of toggling

//In this HTML document, I am trying to achieve a functionality where my buttons can toggle the style of an h1 element between the colors yellow and purple when clicked. However, I have encountered an issue where the buttons disappear during a transition ...

Incorporating PHP script within a stylesheet

Is it possible to include php code within a css file for adding conditions to css properties? styles.css <?php if($suserid == 2) { ?> .proverb { border:0px solid blue; margin-left:34px; width:250px !important; margin-top:6px; } <?php } e ...

having trouble with developing a dropdown menu using jquery

I'm currently creating a drop-down menu for my website and here is the code I'm using: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html dir="ltr"> <head> <met ...

A particular character is displayed exclusively in a text box using either jQuery or JavaScript

Text Box <input id="txtbo" type="text" value="CAN'T TOUCH THIS!" size="50" /> Solution Using jQuery or Javascript: var readOnlyLength = $('#txtbo').val().length; $('#txtbo').on('keypress, keydown', function(even ...

Sending data between two HTML templates in Django

Currently working on a web project with Django, still learning the ropes of Django. I'm facing an issue that has me stumped: I need to retrieve user input from one HTML search box and show it on another HTML page. This is the code for my initial ...

In a production environment, jQuery's ajax functionality may encounter issues specifically on Internet Explorer

I am experiencing an issue with making a service call using jQuery's ajax function. During testing on my local environment in both IE and Chrome, the call works properly. However, once our site is deployed to production, I can only get the service cal ...

The following code automatically triggers the loading of a modal, which contains a checkbox upon loading

What is the best way to prevent the modal from showing again if the user checks the checkbox and clicks the close button? function popUp() { $("#LoadModal").show() var modal = document.getElementById('LoadModal') var closeBtn = document ...

Preventing CSS background images from loading remotely due to content security policy restrictions

I am facing an issue where a background image loaded from a remote server is being blocked by my CSP with the following message Content Security Policy: The page's settings blocked the loading of a resource at self ("default-src * "). Source: b ...

Postponing the initial display of a webpage

I am working with a web application from a different company that has some customization options limited to CSS and allows me to add HTML content at certain points in the code. However, I need more flexibility than what CSS can offer, so I have resorted t ...

Display the input in the text box before making a selection from the dropdown menu

Latest Technologies: $(document).ready(function(){ $('#userID').change(function(){ $('#username').val($('#userID option:selected').data('username')); }); }); Coding in HTML: <select class="form- ...

The CSS3 selector matching a value starting with "[attribute^=value]" does not match a value that has spaces after the quotation marks

When using the div[class^="test"] selector, keep in mind that it will not select an element with a class attribute like class=" test-something" (This selector was generated on the backend.) Using the div[class^=" test"] is not a valid choice. ...

Switch up the font style of the title element

Is it possible to modify the font-family of the title attribute in an input field using either JavaScript or jQuery? <input type="text" title="Enter Your Name" id="txtName" /> ...

What are the steps to create a custom progress bar using JavaScript?

I have experience with HTML and CSS. Below is the HTML code: <div id="wrapper"> <ul id="top"> <center><li><a href="#one" class="button">GENERATE</a></li></center> </ul> <div class="box" i ...

I'm feeling a bit lost on how to pull out HTML tag elements using Python

I have been attempting to extract the html tags for alternative purposes, but due to the structure of the html file, I am facing challenges using conventional methods to locate the elements. The section containing the elements is quite long (consisting of ...

Leveraging Repeater in ASP.NET along with jQuery for handling DataTables

I am a beginner with ASP.NET technology and I am exploring the use of datatable jQuery with a repeater. However, I am facing an issue where the datatable is not displaying the values inside the table, it only shows the headings (as shown below). These val ...

Leveraging SASS for injecting a variable into a mixin where the declaration is in string format

I have been developing a SASS mixin that allows for the input of various variables to construct a font-awesome declaration in the following format: @mixin after-font-awesome($unicode, $size, $margin, $color, $weight) { &:after { content:$unicode ...