Changing the Title of UI Tabs

I am facing an issue with setting the title in tabs, as the title is appearing behind the background. If I set background: transparent; in the #tabss .ui-tabs-nav class, then my title shows up properly. Otherwise, it gets displayed behind the background.

Here is the CSS code:

#tabss {
padding: 0px;
background: none;
border-width: 0px;
position: relative;
width:100%;
height:100%;
zoom:1;
}

#tabss .ui-tabs-nav {
background: url("img/top-bg-column.gif") repeat;
border:0px;
//background: transparent;
text-align: right;
zoom:2;
height:30px;
border-radius: 4px 4px 0px 0px;
}
#tabss .ui-tabs-nav li { display: inline-block; float: none; border-color:#dfdfdf; position: relative; top: 1px; margin: 1px 0 0 0;  white-space: nowrap; }
#tabss .ui-tabs-nav li a { color:#222; background: url("img/top-bg-column-hover.gif"); font-weight:normal; padding:2px 10px 4px 10px; }
#tabss .ui-tabs-nav li a:hover { color:#666; background:#f7f7f7; }
#tabss .ui-tabs-nav li.ui-tabs-selected a { background:#f7f7f7; color:#666;  }
#tabss .ui-tabs-nav li.ui-tabs-selected { top:3px; }
#tabss .ui-tab-title { position: absolute; left: 0px; top: 0px; font-size:18px; color:red; zoom:3; }
#tabss .ui-tabs-panel {
background-color:#f7f7f7;
border-color:#dfdfdf;
border-width: 0px 1px 1px 1px;
-moz-border-radius: 0px 0px 4px 4px;
-webkit-border-radius: 0px 0px 4px 4px;
border-radius: 0px 0px 4px 4px;
padding: 10px;
 }

And here is the HTML code:

<div id="tabss" class="tabs">
  <p class="ui-tab-title">My Title</p>
   <ul>
    <li><a href="#tabs-1">Tab 1</a></li>-->
    <li><a href="#tabs-2">Tab 2</a></li>
  </ul>
  <div id="tabs-1">
   // data
  </div>
 <div id="tabs-2">
   // data
  </div>
 </div>

Answer №1

Revise your HTML code by removing

<p class="ui-tab-title">My Title</p>

<div id="tabss" class="tabs">
   <ul>
    <li><a href="#tabs-1">Tab 1</a></li>-->
    <li><a href="#tabs-2">Tab 2</a></li>
  </ul>
  <div id="tabs-1">
   // data
  </div>
 <div id="tabs-2">
   // data
  </div>
 </div>

Add the following code after configuring the UI tabs.

$('#tabss').prepend('<p class="ui-tab-title">My Title</p>');

** If this does not meet your requirements, please provide further details

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

jQuery Hide function malfunctions when the contents of divs are sorted

I stumbled upon some jQuery code that can arrange divs either numerically or alphabetically based on their content. To enhance this functionality, I included a feature to hide a div by clicking on it. While sorting the divs and hiding them individually wor ...

Automate web page interactions using Python Selenium to duplicate a class

Is there a method to duplicate a class? view image description here Upon examining the data-sitekey, I aim to replicate everything following it, namely 6Ld_LMAUAAAAAOIqLSy5XY9-DUKLkAgiDpqtTJ9b. Is this feasible? ...

Change the position of buttons inside a Bootstrap 4 modal to the left side

I am currently working with a modal in bootstrap 4 and I would like to reposition the 'cancel' and return buttons to the left side of the modal. I have set up a js fiddle for reference: https://jsfiddle.net/andrewsolis/08v6znox/. Below is my HTML ...

retrieve the value of a textarea element from an HTML table

Is there a way to extract data from a nested table's textarea using the row index? I attempted the following code snippet but it did not work. var note = document.getElementById($index).cells[3]; var y = document.getElementsByTagName("textarea").valu ...

The Facebook Comments widget causes the webpage to automatically scroll to the bottom on older versions of Internet Explorer like

My webpage is quite lengthy and includes a Facebook comments widget at the bottom. However, when loading in IE7 and IE8, the page instantly jumps to the bottom due to this widget. Interestingly, removing the widget allows the page to load normally. This ...

What could be causing the 400 error when attempting to retrieve a post through AJAX on a WordPress site?

The objective: Utilize AJAX to showcase a post's title and content. Progress so far: Loaded custom.js and localized AJAX in functions.php: wp_enqueue_script( 'custom_js', get_stylesheet_directory_uri() . '/custom.js', array( &apo ...

Navigating Divs Using jQuery

I am working with a class that has multiple divs, each with a unique id attached to it. I am using jQuery to dynamically cycle through these divs. This is a snippet of my HTML code: <div id ="result">RESULT GOES HERE</div> ...

The ellipsis text-overflow feature occasionally malfunctions during a single session when using IE 11

.show-ellipsis { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } <div class="container"> <div class="row show-ellipsis"> {{record.bodyName}} </div> </div> My web application supports versions o ...

Challenges arising from utilizing distinct list style types for both parent and child elements with the assistance of CSS List

I am experimenting with the CSS counter reset feature to create a numbering system on my website. The main list should be in regular decimal format (e.g. 1, 2, 3, 4) while the sub-list should be in upper Roman numerals (e.g. I, II, III, IV, etc). Below is ...

The alignment of links is not meeting the centering requirement

I'm facing a challenge with aligning my "buttons" on the pages, although they are essentially text links designed to resemble buttons using CSS. These buttons are utilized within an unordered list structure (refer to the HTML snippet below). The rele ...

Chrome displays radio buttons with a white background that is not intended. Firefox, on the other hand

The radio buttons in Google Chrome are displaying an unwanted white background around the circle, which is not the intended behavior as seen in Firefox. Please refer to these images for comparison. For a direct example of the issue on the page, please vi ...

jQuery UI Tabs: Issue with JSON data not showing up

Currently, I am utilizing jquery UI tabs along with ajax functionality. The JSON data format that the ajax will be receiving looks like this: [ { "title" :"a note", "type" :"text", "content" :"MY FIRST NOTE!" }, { "title" :"t ...

The bootstrap table did not meet my expectations as I had hoped

I am currently using Bootstrap to create a basic two-column table similar to the one on the Bootstrap website here: http://getbootstrap.com/css/#tables. To achieve this, I have implemented a javascript function to display the table as shown below: $(&bso ...

Heroku NodeJS - Page Not Found: Error 404

I recently set up a Heroku server with BootBot running on it, but I'm facing challenges while trying to render an HTML page from it. Here is what I have in my code: var app = express(); var path = require('path'); app.use(express.static(pat ...

"Initial loading issue with bootstrap carousel causes slides not to slide smoothly

I am currently working on implementing a slider carousel using Bootstrap. Although the 'active' image loads successfully, the controls and slide functionality are not working as expected. Initially, I believed this exercise would be straightforwa ...

Generate an array of objects based on the attributes of img elements, extract their values, and display them using jQuery

I currently have a fullscreen plug-in that works with static URLs, but I want to switch to using dynamic image data generated by a CMS on the page. Here is a snippet of the HTML output from the CMS: <ul class="large-gallery"> <li> <a href ...

Tips for implementing ng-hide/ng-show animations

Is there a way to create an animation on an element in Angular that will be triggered when the item's visibility is changed using ng-hide/ng-show? Which specific CSS classes should be included to ensure smooth animations on elements? ...

Validation method in jQuery for a set of checkboxes with distinct identifiers

I am faced with a situation where I have a set of checkboxes that, due to the integration with another platform, must have individual names even though they are all interconnected. <div class="form-group col-xs-6 checkbox-group"> <label cla ...

An HTML attribute with a blank value will not display the equals sign operator

jQuery can be used like this: $select.append('<option value="">All</option>'); This code appears to insert the element in HTML as follows: <option value>All</option> However, what is intended is to append the elemen ...

Implement a unique InfoWindow for every individual polygon within the Google Maps API

Currently facing difficulties in implementing an infowindow for each polygon that has been created. Attempted various code samples from different sources without success. Below is the existing code snippet, but clicking on a polygon does not trigger any ac ...