Why aren't the input fields on my HTML form matching the styling of the PureCSS website?

I added the pure-css to my html template and created a simple form. I expected it to look just like the form on the PureCSS website.

However, the buttons are nicely styled but the input elements in the form appear plain. No rounded corners or highlights. I checked on two different browsers.

Even after including the theme from the Skin Builder and adding my own pure-css-theme class, as well as trying to copy the 'blue-theme' from the Pure site, the input elements remained unstyled.

I couldn't find any other solutions in the pure-css site source code.

Why aren't the input elements being styled?

I must be missing something obvious here.

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css">
    </head>

<body>
<div>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

<form class="pure-form pure-form-aligned" action="{% url 'checkin' %}" method="post">
    {% csrf_token %}
    <fieldset>
        <legend> Your position </legend>
        <input type="textfield" name="latitude"  id="latitude"  placeholder="Latitude" /><br>
        <input type="textfield" name="longitude" id="longitude" placeholder="Longitude"/><br>
        <input type="textfield" name="accuracy"  id="accuracy"  placeholder="Accuracy" readonly><br>
    </fieldset>
    <fieldset>
        <button class="pure-button " type="submit">Send </button>
    </fieldset>

</form>

Answer №1

after checking out this awesome example:

make sure to assign the form a class of 'pure-form'

<form class="pure-form">
    <fieldset>
        your inputs
    </fieldset>
</form>

in addition to 'pure-form', you may also use: pure-form-stacked or pure-form-aligned for different effects. I highly suggest exploring the provided link above!

Edit 1

consider using type='text' instead of 'textfield'

<form class="pure-form pure-form-aligned" action="{% url 'checkin' %}" method="post">
    {% csrf_token %}
    <fieldset>
        <legend> Your position </legend>
        <input type="text" name="latitude"  id="latitude"  placeholder="Latitude" /><br>
        <input type="text" name="longitude" id="longitude" placeholder="Longitude"/><br>
        <input type="text" name="accuracy"  id="accuracy"  placeholder="Accuracy" readonly><br>
    </fieldset>
    <fieldset>
        <button class="pure-button " type="submit">Send </button>
    </fieldset>

</form>

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

Issue with Flask and JS: Syntax error detected - Unexpected token '<'

The Flask web app is currently working on fetching data from a database table and displaying it in HTML format using a JavaScript file that handles this operation. This whole process is integrated within a single Flask application. I've attempted to ...

What is the reason behind the gray background color showing up exclusively in Google Chrome?

When using other browsers, there are no issues. However, in Chrome, a gray background color appears when hovering over the menu, and partially or completely disappears when moving the mouse away from the menu. Interestingly, it also vanishes completely whe ...

Tips for adjusting text to fit within a container without needing to use overflow:auto

Is there a way to prevent text overflow in a container without using the overflow:auto property? I've come across plugins that automatically reduce the text size, but I'm not keen on that solution. What I want is for long words or URLs to wrap on ...

Determining the precise mouse location within child elements regardless of zoom level, scrolling, or dimension changes

My goal is to accurately determine mouse coordinates within the page elements. To see the code in action, please visit: http://jsfiddle.net/t8w9k6gu/ $('#p1, #p2, #p3').on('click mousemove touchmove', function(ev){ var target = ...

The transition from Vuetify 2 to Vuetify 3 involves replacing deprecated properties like app, clipped-left, and offset-y with the new property called "

Seeking guidance on upgrading from Vuetify/Vue 2 to 3. As a non front-end developer tasked with updating legacy code, I'm facing challenges due to the migration guide assuming CSS knowledge and lacking examples for resolving removed features. The gui ...

When scrolling vertically in a Flutter app, the TabBar Fixed Container Shadow descends beneath the ListView

I have successfully added a shadow to my Container using the Material Widget and BoxShadow. However, I am facing an issue with the shadow position when I expand a ListView at the bottom of the fixed container. As I scroll up vertically, the container shado ...

Is it possible to dynamically update the options in the second dropdown list based on the selection made in the first dropdown list, ensuring that the values stay within a specified range?

Is it possible to remove certain options from the "Max_Price" Dropdownlist based on the selection made in the "Min_Price" Dropdownlist using JavaScript? For example, if a user selects the option with a value of "200000" in the "Min_Price" Dropdownlist, the ...

Tips for customizing a bootstrap CSS file or incorporating it into your project

Embarking on a new journey into web development, I found myself diving deep into the realms of the internet to edit a template for a forum website. It's certainly a challenge, given my limited experience in this field. The template utilizes a bootstr ...

How can I take a screenshot from the client side and save it on the server side using PHP?

Currently, I am exploring the possibility of screen capturing at the client side. It appears that the "imagegrabscreen()" function can only capture screens on the server side. After some research, I discovered a new function that allows for screen capture ...

Obtaining information from within the <div> element containing data in <p> tags

Seeking to extract information from the specified tag. Successfully completed the following steps. Document doc = Jsoup.parse(currMsg); Elements ele = doc.select("p"); This code returns <p>data</p> I am looking for only data. Next, attempte ...

Struggling to format XML in a tree structure for the output file

I have been attempting to accomplish this task using PHP code to save data in XML file in a tree format, but unfortunately, I have not been successful. There seems to be an issue that I can't quite pinpoint. The output continues to appear as a long st ...

Adjust the display of inline-block divs to disregard line breaks

I am having an issue with three side-by-side divs using the display:inline-block property. When the divs are empty, they all align perfectly on the same horizontal level. However, once I add <p> tags and some line breaks (<br/>) to the first ...

Creating visually appealing Jquery-ui tab designs

Trying to customize the jquery tabs, I experimented with styling them to my liking. One thing I did was attempt to reduce the size of the tabs by adding a height:45px; to the UI stylesheet shown below. .ui-tabs-vertical .ui-tabs-nav li { clear: left; ...

What could be causing the API link to not update properly when using Angular binding within the ngOnInit method?

Hi there, I'm currently working on binding some data using onclick events. I am able to confirm that the data binding is functioning properly as I have included interpolation in the HTML to display the updated value. However, my challenge lies in upd ...

Enhancing jQuery functionality: Ensuring newly added elements are aware of existing functions

I need assistance with my HTML table. Each row (tr) contains a value, for example 200$, and a delete button. How can I ensure that each new row added automatically knows the recent functions without having to call them every time? $(function () { $(&ap ...

Add JavaScript and CSS files from the node_modules folder to enhance a static HTML webpage

Currently, my development server is set up using node's live-server. However, for production, I plan to use a LAMP server. Within my node_modules directory, I have the normalize.css file. In my index.html, I currently link to it like this: <link ...

Automatically update the border sample once the visitor enters a color code into the input text field

Is it possible to automatically change the sample border when a visitor enters a color code in the input textfield at: Do you have a specific border color in mind? input name="ContentInclude:borderspecs" type="text" maxlength="200" id="ContentInclude_bor ...

Justifying content is failing to perform its duty, while aligning items is successfully fulfilling its role

Can someone explain why the align-items property in this code is centering child elements on the x-axis instead of the y-axis? Also, the justify-content: center doesn't seem to have any effect. Even when I remove justify-content, the items are still a ...

Combining HTML pages with Laravel framework

I successfully integrated an HTML template with multiple pages into my Laravel project. The main page is functioning properly, but I am encountering issues when trying to navigate to the other HTML pages through links on the main page. However, typing the ...

Execute a function only once when using it in conjunction with ng-repeat in AngularJS

I need a way to ensure that a specific function is only called once when used in conjunction with ng-if and ng-repeat. <td ng-if="!vm.monthView && vm.yearView=='contract-year'" nginit="vm.ContractYearBaselines()" class="baseline-data ...