Applying CSS leads to no visible changes on the screen

I encountered a strange issue with my CSS - the button background color should be blue with white text, but it is not displaying correctly. I tried moving the code within a div container, but it still doesn't work properly. If anyone knows how to solve this problem, please help! HTML code

    <!DOCTYPE html>
<html lang="en">
<head>
    <title>Restaurant Club</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="stylesheets/style.css">
</head>

<body>
        <section>
            <h2>Welcome to restaurant Club</h2>
        </section>

    <div class="div_design">
        <aside>
            <form>
                <fieldset class="label_design">
                    <legend class="title_design">Evaluate your choice of restaurant</legend>
                    <label for="Users" class="label_design">Restaurant evaluate</label>
                    <input id="Users" type="text" class="text_input" placeholder="Restaurant evaluation">
                    <button type="button" class="button_design" value="add">Add</button>
                </fieldset>
            </form>
        </aside>
    </div>
</body>
</html>

CSS Code

body {
  padding: 1.2em;
  font: 1.3em "Lucida Grande", Helvetica, Arial, sans-serif;
  background-color: #F3F2EF;
}

a {
  color: #00B7FF;
}

.div_design {
  background-color: #ffffff;
  height:auto;
  margin: 8%;
  margin-right: 5%;
  border-radius: 1%;
};

.field_design {
  border:none;
};

.label_design {
  display:block;
  margin: 0.25em;
};

.title_design {
  font-size: 2.5rem;
  margin: 2%;
  border-bottom: 1% solid blue;
}
.text_input {
  font-size: 1.2em;
  line-height: 1.5;
  display: block;
  margin: 0.25em;
  border-radius: 3px;
};

.button_design {
  color:blue;
  margin: 0.25em;
  background-color: rgba(51,121,245,0.88);
};

This issue is really puzzling to me and I haven't encountered it before. https://i.sstatic.net/InqLR.png

Answer №1

Removing those semicolons in the CSS file may be necessary.

I tested it and found success after removal.

Would you consider trying to remove them as well?

Answer №2

The issue has been identified. It seems to have occurred due to the additional semicolons (;) added at the end of the class or element. Please ensure that all semicolons are removed.

https://i.sstatic.net/HBYca.png

Answer №3

To achieve the desired result, you should eliminate the semicolons after the closing curly braces.

It's important to note that the "color" attribute pertains to font color, not background color. To make the necessary adjustment, simply utilize color names instead of rgba values. Update the CSS code for the button using the following lines - the margin is already set correctly:

color: white;

background-color: blue;

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

Main menu items failing to display sub menu options

I am in need of assistance as I am facing the same issue on two WordPress twin websites that are using the same theme (Newmagz), which is no longer purchased and therefore not supported. The submenus in the main menu are simply not appearing. I have checke ...

The importance of having separate CSS styles for various browsers, particularly when dealing with different versions of Internet Explorer like IE6, IE7, IE8, and IE9

I have always been intrigued by the fact that default CSS does not always work across all browsers, often resulting in breaks specifically for IE browsers (6, 7, 8, 9). As a result, we typically find ourselves creating multiple CSS files tailored for dif ...

The placement and dimensions of a transparent black filter in CSS using bootstrap 4

I am currently working with the latest version of bootstrap and I am facing some challenges with the CSS due to my lack of familiarity with it (I have very little experience with bootstrap). My goal is to add a black filter to my images (specifically thos ...

Creating a string-based template that can be included in Django

I need to create a list of clickable links for my navigation bar with the URLs provided using the url-tag. To achieve this, I have a list of dictionaries containing all the necessary information for each link, and I am creating a template string with them ...

Incorporating external json information into an HTML form

How do I go about loading an external JSON file? Please note: External files may be blocked by server settings. Populate forms using local JSON <form id="datas-from-json"> <div class="form-group"> <labe ...

Utilized JavaScript and CSS class to create a toggleable button

I am attempting to implement a toggle script on a button by using a CSS class. Issue: When I click on button2, it automatically selects button3, which is incorrect. Only one button should be active at a time upon clicking. function togbtn9() { $("#b ...

Loading screen while all files and audio are being loaded

My JavaScript code is responsible for displaying and playing audio on my website. Unfortunately, the load time of the page is quite slow. To address this issue, I decided to follow a tutorial on installing a preloader, which can be found at . Although I ...

What could be causing the empty area at the top of my navigation bar?

After adding a fixed position to my nav bar, I noticed a gap at the top. Is this caused by the display: flex; property? Any insights would be appreciated. It seems like I need to provide a lot of information just to get an answer to this issue. html { ...

Using JQuery to append an additional column to an HTML table at the end, determined by array information

I've been experimenting with how to enhance an html table by adding a new column of data. The process involves clicking a button, extracting the existing data column in the table, storing it in an array, performing calculations on it, and then display ...

Excessive memory consumption by images in Android WebView

Our current project utilizes webviews to showcase HTML content that is delivered from a server in JSON format. These HTML files contain text, images, and URLs. However, we are facing an issue where the images are consuming excessive amounts of memory, reac ...

Discovering the art of line breaks

Imagine I have a random block of text displayed in a single line, like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Due to various reasons such as width settings or text-zoom, the text may display as two or more lines on the viewer&apos ...

Connecting a .css file to a markdown .doc file

I have been attempting to incorporate some .css styling into my Rmarkdown file. To achieve this, I first created a notepad file containing the following code: #nextsteps { color: blue; } .emphasized { font-size: 1.2em; } Subsequently, I saved this fil ...

Show the sticky dropdown only when an error occurs during submission

My goal is to have the dropdown selected only when an error occurs, and here is the script I am using <select name="usertype" id="usertype" class="form-control"> <option value="">Please select the user type</option> <option va ...

position the input and span elements side by side

Need help aligning an input and a span element next to each other. The span is currently positioned below the input, but I want it to be on the right side of the input. I am trying to create a search bar using this input and span tag, so they need to be al ...

Unintroduced jQuery Keyup

I am currently working on a project where I am trying to incorporate an autocomplete feature into an input form. My approach involves using jQuery to trigger an AJAX call to a servlet and adding a listener on the input field for keyup events. However, it s ...

Create custom validation CSS offset positioning using Materialize

My website is designed with the Materialize framework which includes a select field feature: .input-field Region(s) = select_tag 'user[region_ids][]', options_for_select(@regions_list), :multiple => true, :class => %w(toHide regi ...

Aligning content within a div block

I created a div block that houses a form structured like this: <div class="divClass"> <form id="frm" method="post" action="/NotDefinedYet/index.xhtml" class="frmClass"> <input type="text" name="j_idt9:j_idt10:Username" placehold ...

What is the easiest way to locate the ID of an iframe embedded within a webpage?

Currently, I am focused on developing small JavaScript/HTML5 ads for a webpage. Each advertisement comes with its own iframe that occupies a specific size and space on the page. In order to accommodate an expandable ad that needs to surpass the predetermin ...

Guide to integrating a legend with ngb-timepicker form?

Is there a way to add a specific tag to the fieldset of ngb-timepicker? I'm having trouble finding a solution for this. Has anyone else tried to do this before? ...

What could be causing my navbar to not be responsive on mobile devices?

I'm in need of assistance. When viewing my website in mobile mode, the collapse hamburger menu is hiding too far to the right. This issue is making the site look unresponsive, and I've been unable to find a solution. It seems like the problem sta ...