Styling listview items' color and text using CSS

I am struggling to format my listview item to match the desired design shown in the image. Unfortunately, my CSS skills are lacking and I can't seem to remove the unwanted image titled "menu_icon" without breaking the formatting completely. Additionally, I would like to change the color of the gear icon to green and maintain a white background on both sides of the text area. Any help or advice on how to achieve this would be greatly appreciated. Thank you!

<html>
   <head>
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
     <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
     <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
   </head>

   <div data-role="page" id="page1">
        <div data-role="header" data-position="fixed" data-tap-toggle="false">
             <h1>My page</h1> 
        </div>

        <div role="main"  class="ui-content">
           <ul data-role="listview" data-inset="true">
              <li>
                 <a href="./menu_icon.png"></a>
                 <a href="#download" data-transition="pop" data-icon="gear" style="color: green;">Download Browser</a>
              </li>
              <li>
                 <a href="#"></a>
                 <a href="#download" data-transition="pop" data-icon="gear" style="color: green;">Download Browser</a>
              </li>
           </ul>
        </div>

        <div data-role="footer" data-position="fixed" data-tap-toggle="false">
           <h1>My page footer</h1>
        </div>
   </div>
</html>

Answer №1

Here is a suggested code snippet:

<style>
.ui-header, .ui-footer,
.ui-btn-icon-notext:after {
    background-color: #23B14D !important;
    color: #fff !important;
    text-shadow: none !important;
}
.ui-btn {
    background-color: #fff !important;
}
.ui-li-has-alt a:first-child {
    border-top: #FFC90F 8px solid !important;
}
.ui-li-has-alt a:last-child {
    border-top: #00A3E8 8px solid !important;
}
</style>

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

Align the parent div center and have both dynamic and fixed width child divs inside

In the main parent div, there is a combination of my logo and navigation bar. The logo has a fixed width while the dynamic-width navigation bar is positioned 100px to the right of the logo. However, the current layout places them on the left side of the s ...

Trouble arising when attempting to add or remove classes using JavaScript

I've been trying to use JavaScript to toggle the visibility of contact_form_top by adding or removing the hidden class when the button contact_form_btn is clicked, but I'm having trouble getting it to function properly. function hide_unhide_btn( ...

HTML and CSS are distinct entities with their own individual purposes and

Can you create custom entities? For example: &longline; --> ----------------------------- and then incorporate it in HTML code: <div> &longline; bla bl bla </div> ...

Stop navigation links from resizing when the page content does not fill the height of the display

As I work on my very first website, I've encountered a strange issue with the navigational links at the top of each page. I've noticed that pages with content exceeding the maximum vertical pixels occupy a specific width, while those with less co ...

Utilizing Robot Framework to select CSS attributes

The Selenium documentation provides an example of how to use Get Element Attribute: ${id}= Get Element Attribute css:h1 id However, I encountered a problem with this selector: ${VISIBILITY}= Get Element Attribute css:visibility mySidebar I ...

What could be the reason for the react-bootstrap text-center not functioning properly? And why is my HR element automatically centering itself when I adjust the width?

Hello everyone, I am currently working on creating the front-end of my website using react-bootstrap. I am facing an issue where when I try to change the width of my hr element, it automatically centers itself. I also attempted to use the className "text-c ...

Tips for retrieving the chosen value from a dropdown list in HTML

I'm having an issue with exporting specific values from multiple HTML tables into an excel file. My goal is to only export the selected values from each table, with each table being on a separate tab in the excel file. Currently, when I export the ta ...

Issue with footer display while utilizing Bootstrap's cover template

When I utilize the Bootstrap cover template, I encounter an issue where if I resize the window to a smaller level or include enough text to require scrolling, the footer background color turns into a solid color. This is also visible in the template I am u ...

Unforeseen gap found between the div elements

I'm puzzled by the appearance of a mysterious blank space between two div elements. Here's the HTML code in question: <div id="header"> <img id="background" src="http://farm3.staticflickr.com/2847/11154210265_a8854fe5c5_h.jpg" alt=" ...

What could be the reason for body height displaying as zero even when a non-zero value is specified?

My current code snippet is as follows: ... <STYLE> body{ position: static; height: 95%; width: 95%; border: 2px; border-style: solid; border-radius: 5px; border-color: black; background-color: pink; } <STYLE> ...

I'm having trouble accessing the Github website. Is there anyone who can lend a hand?

I am facing difficulties accessing the Github webpage through my home Comcast network. It seems that the issue I am experiencing is similar to the one mentioned in this Stack Overflow post about Could Not Resolve Host github.com. However, since the DNS se ...

Creating a Dynamic Navigation Bar with Pure CSS

On my website , I currently have a navigation menu on the left that expands when clicked and closes when clicked again. It's currently implemented using jQuery, but I'm wondering if there's a way to achieve the same effect using just CSS. ...

Stripping CSS from my HTML using TinyMCE

I have created a custom Javascript function that retrieves the content of an HTML file from my server and then integrates it into a TinyMCE editor. Here is the function: function LoadTemplate(url) { $.post(url, function (data) { // Access the ...

The layout is completely wrecked by the Android Jquery Listview Filter

I am attempting to create a simple listview with a filter in Android 4.1.2, but it seems to be affecting the fixed layout elements such as header/footer. When tapping into the filter box, the listview no longer fits on the screen properly. Could this be a ...

I encountered a difficulty trying to assign a value to @Input decorators in the spec file

While writing a test case for form submission, I encountered an issue where the Input decorator (e.g. station) value is reassigned during form submission. However, when attempting to define this Input value in the spec file, the component.station value is ...

Issue encountered with nth-child selector

I came across the following CSS code snippet: a { display:table; } a:hover { text-decoration:none; } a:first-child { color:#00FF00; /* green */ } a:nth-child(3) { color:#FF0000; /* red */ } <a href="www.google.com">Google&l ...

Guidelines for dynamically passing HTML attribute values into a CSS selector using a variable in Protractor

After successfully locating the button on the row using its value stored in the "title" HTML attribute, I am now faced with the task of passing a dynamic value to this attribute. To achieve this, I have declared it as a variable. However, I am unsure about ...

The box shadow comes to a halt just shy of reaching the bottom of the

I'm having an issue with my box shadow on the body element. Everything looks great until I add content that causes the page to scroll beyond the viewport. The background of the body continues, but the box shadow stops short. Is there a way to extend t ...

Issues with transferring object data from JavaScript to a Web API

I am facing issues while attempting to transfer a file from my local machine to SharePoint using JavaScript to ASP.NET MVC Web API call. I continuously encounter errors such as Type error, resource not found, etc. Is there anyone who can provide assistance ...

implementing a new CSS file to replace the existing one

Is there a way to dynamically load CSS properties in JavaScript? I have two canvases and I've already linked a CSS file in the head tag. I'm looking for a solution where when a specific option is selected, the CSS properties of the canvases cha ...