Prevent styling on a fixed header in Jquery Mobile

Hello everyone, I am currently attempting to deactivate the theme/style on a fixed header within the following code snippet:

<div id="home-header" data-role="header" data-id="mobile-header" role="banner" 
 data-position="fixed" style="background-color: #FF8040; 
 class="ui-header ui-header-fixed slidedown" 
 -webkit-box-shadow: 0px 0px 8px 2px #000000; 
 -moz-box-shadow: 0px 0px 8px 2px #000000; box-shadow: 0px 0px 8px 2px #000000;">
    <span class="ui-title" role="heading" aria-level="1">
        Temporary text
    </span>
</div><!-- /Header -->

I have attempted using data-role="none", but it only disrupts the fixed header (causing it to float at the bottom of the screen). Removing the class= did not work either as it would reappear in the rendered code automatically.

Is there a method to achieve this without affecting the regular functioning of a fixed header in JMobile?

Thank you.

update #1

#home-header {
        background-color: #FF8040 !important; 
        -webkit-box-shadow: 0px 0px 8px 2px #000000 !important; 
        -moz-box-shadow: 0px 0px 8px 2px #000000 !important; 
        box-shadow: 0px 0px 8px 2px #000000 !important;
}

<div id="home-header" data-role="header" data-id="mobile-header" data-position="fixed" role="banner">
    <h1 class="ui-title" role="heading" aria-level="1">
        Temp test here
    </h1>
</div><!-- /Header -->

update #2

.ui-bar-a {
        border: 1px solid #FFA346 !important;
        background: #FF8040 !important;
        -webkit-box-shadow: 0px 0px 8px 2px #000000 !important; 
        -moz-box-shadow: 0px 0px 8px 2px #000000 !important; 
        box-shadow: 0px 0px 8px 2px #000000 !important;
}

Answer №1

Here is a practical demonstration: http://jsfiddle.net/aJXXx/

In jQuery Mobile, it is necessary to use !important to override any css changes:

#home-header {
    background: none !important;
    text-shadow:  none !important;
    color: red !important;
}

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

Excessive image display | HTML and CSS synergize

I am having some trouble with my image gallery. Each image is displayed as a vertical column and has zooming effects when hovered over. Clicking on an image should show it in full screen with a caption. The problem arises when dealing with images that are ...

Altering Iframe Source Using Jquery

I've been attempting to change an iframe's src attribute using jQuery, but for some reason, the code isn't working as expected. The alert also fails to pop up. JS: <script src="../Scripts/jquery-1.11.0.js" type="text/javascript">< ...

The alignment of Material-UI Typography in AppBar appears to be off

Having trouble centering text in an AppBar? You're not alone. Despite trying various methods like using Typography element, align="center", textAlign="center", and style={{ align: "center" }}, among others: class CustomApp extends React.Component { ...

Locate a list item within an unordered list and proceed with a comparison

Looking for a way to target an li within a specific ul that has a data-rank higher than the others, and apply different styling to it in comparison to its sibling li. Is there a smart approach to achieve this using regular CSS or styled components? <ul ...

Refresh the razor page using a JavaScript POST request

I have a dashboard page in asp.net that displays tables and statistics, along with a filter panel containing checkboxes and a date range picker. I implemented jQuery to trigger an Ajax POST request whenever a checkbox is clicked. The request sends the filt ...

The design problem arises from using jQuery to dynamically prepare the table body at runtime

The table row and data are not appearing in the correct format. Here is a link to the problem on Fiddle: http://jsfiddle.net/otc056L9/ Below is the HTML code: <table border="1" style="width: 100%" class="eventtable"> <thead style="color: b ...

Is it possible to automatically extract HTML code from a webpage using a function, without having to do it manually?

Is there a way to fetch the HTML code of a website after running a particular function? Here's the scenario I'm dealing with: I need to extract the link of a source embedded in an iFrame element that only becomes visible when I execute a specif ...

Issue with rendering Jquery and Ajax components

I've encountered an issue with my code. When I submit a comment, the textarea loses its position. I've checked the CSS but haven't had any luck. $(document).ready(function(){ $("#box-table-a").tablesorter(); var messa ...

How to incorporate JSON into a d3.js calendar display?

Learning d3 charts and javascript has been quite challenging for me. After researching a lot, I successfully populated the chart with CSV data. Now, my next goal is to populate the chart with json data. This is the code I'm using, which is inspired ...

Tips for assessing JSON response data from an AJAX form

I am struggling with how to properly structure a question, but I would like to explain my situation. I am using AJAX to send data and receiving JSON in return. Each value in the JSON response represents a status, and I need to test and react based on these ...

Leveraging line breaks in JavaScript with jQuery

Currently, I am utilizing the following code: $('#'+type+'name'+id).hide().html('ghj').fadeIn(150); This code works perfectly fine. However, when I try to implement this code: $('#'+type+'name'+id).hide( ...

Insert a horizontal line within the text

I am struggling to get the horizontal lines to work on my traffic light dashboard view for one of my website pages. Despite making multiple adjustments, it seems like I just can't get them to display correctly. Here is an example of what I want: View ...

Callback function not being triggered in Jquery's getJson method

I am currently faced with a javascript conundrum. Below is the snippet of code that I have been working on: $.get("categories/json_get_cities/" + stateId, function(result) { //code here }, 'json' ); ...

What is the reason for the global impact of CSS-Modules on html elements?

There is a file named mycomponent.module.css button { width: 10vw; min-width: 150px; } It seems like this CSS is being applied globally instead of just to the specific component where I imported it. Could it be that CSS modules only work on class ...

Cover the entire page with a solid background color

Is there a way to extend the green color from top to bottom on the page? Also, how can I move the CRUD section to the left? https://i.sstatic.net/pXxhl.png I'm having trouble filling the entire page with the content. Below is my code written in Vue ...

Error: PHP is showing an undefined index error when trying to decode JSON, even though the value

I am feeling quite puzzled. I transferred a key value pair object from jQuery to PHP and successfully alerted it back out. However, when I visit the PHP page, it indicates that the data is either null or an undefined index. Here is my jQuery code: $(&ap ...

Bootstrap 5: The alignment of NAV items to the right is off

Is there a way to align the navigation items to the right side? I'm currently using Bootstrap 5 and leveraging the navigation feature. By default, the items are positioned on the left, however, I wish to move them to the right side. I have tried util ...

Creating a mobile-friendly table using Bootstrap 4 and CSS: A step-by-step guide

Looking to create a responsive table? I've got my table ready for desktop view, but now I want it to display properly on smartphones too. Here's how my table looks on the website: https://i.sstatic.net/zMXQo.png and here's the code I&apos ...

Maintain a consistent size for the material UI drawer, preventing it from resizing when the content size fluctuates

Incorporating Material UI into my project, I decided to use a drawer for navigation. However, within the drawer, there are Collapsible lists that expand when clicked. The issue arises when the list text items are lengthy, causing the drawer to unexpectedly ...

Trouble with JavaScript loading in HTML webpage

<!DOCTYPE html> <html> <head> <title>Breakout Game</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <canvas width="900" height="450" class="canvas"></canvas> ...