Creating high-quality tabs for a gaming project

I tried following a tutorial on YouTube to create some professional tabs, but unfortunately my code didn't turn out the way I wanted. I was hoping to be able to scroll through different tabs and have a separate HTML file for each one.

Although I'm new to CSS, I believe I formatted it correctly based on the video instructions.

Below is my CSS/HTML code:

CSS code:

...

My HTML code:

...

After implementing the code, the output wasn't what I expected. Instead of being able to scroll through the pages like in the tutorial, my tabs were not functioning properly. Here is a screenshot of the issue: http://prntscr.com/nrkf6v.

Answer №1

Your formatting is incorrect.

You made 5 or 6 CSS errors and a significant one in HTML (the <body tag was not closed). In web development, every character matters. While there are exceptions, they are just that: exceptions.

The golden rule is: "every mistake breaks something."
Here is the correct output.

To ensure your code is error-free, you should use a validator tool (HTML validator, CSS validator, etc...) or an IDE (an intelligent editor that provides suggestions and alerts you of potential mistakes based on current web standards).

body {
  margin: auto;
  background: #efefef;
  font-family: arial;
}

.nav_bar {
  margin: auto;
  border-bottom: 1px solid #000000;
  width: 860px;
  padding: 0 20px 0 20px;
  height: 64px;
  margin-top: 30px;
}
/* more CSS code... */

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

What is preventing me from getting this straightforward CSS transition to function properly?

I'm really struggling with CSS transitions and trying to figure out why my transition for the div class=text is not working as expected. const menuToggle = document.querySelector('.toggle') const showCase = document.querySelector('.s ...

The onchange event for the input type=file is failing to trigger on Google Chrome and Firefox

Update: Solved: http://jsfiddle.net/TmUmG/230/ Original question: I am facing an issue with handling image/logo upload alongside a hidden input type=file: <form class="image fit" id="theuploadform"> <input title="click me to chan ...

IFrame displaying blank page instead of report

The following code snippet displays a report within an IFrame: HTML <div id="dialogReport"> <div> <iframe id="reportFrame" style="width: 800px; height: 600px; border: 2px solid black; margin: 10px auto;"> </iframe> </di ...

Why is the error message "Invalid field name: '$conditionalHandlers' in 'collaborators..$conditionalHandlers'" popping up now?

Currently, in my Node/Express/Mongoose application (latest versions), I am working on a feature that involves "Projects" with a list of "collaborators" identified by the IDS of "Users". To simplify complex aggregations, I have decided to store these IDS as ...

The display attribute is malfunctioning in Internet Explorer when trying to style Font Awesome icons

When viewed in IE 11 with CSS properties applied After disabling the display property, the result changes as shown below In the first screenshot, the icon is present but not visible. I want to keep the display:table-cell property for responsiveness. Can ...

Strategies for optimizing the storage of data from react-quill to the backend system

My current project involves developing a blogging site using react. I am incorporating the use of react-quill for the text editor functionality, but I'm facing a challenge in determining the most efficient way to store the data generated by this edito ...

Having trouble with updating label text in MUIDataTable in ReactJS?

Looking to implement multi-language support in MUI Datatables. I have been able to modify the translations, but when attempting to change languages by providing a different object with new translations (verified using console log), the label texts do not u ...

The Bootstrap datepicker functions properly when used in plain HTML, but encounters issues when implemented within the .html()

Using HTML: <input class="m-ctrl-medium date-picker" size="16" type="text" id='lateETD1' name="dateRecv" value=""/> Not working with script: var ETD = $("#ETD"); ETD.html("<input class='m-ctrl-medium date-picker' id='la ...

Can you guide me on using protractor locators to find a child element?

Could you provide a suggestion for locating the <input> element in the DOM below? I have used by.repeater but can only reach the <td> element. Any additional protractor locator I try does not find the <input> element underneath. Thank y ...

Prevent pseudo elements from increasing the height of the viewport

Unexpected issue arose. I recently discovered pseudo elements and have been utilizing them to create a skewed header and footer design without affecting the text inside. The header looks good and functions correctly, meeting my expectations. This is what ...

What is the best way to horizontally center a div on an extra small screen using Bootstrap?

I am looking to design a div layout with 4 columns, but I want the content centered when the screen is in xs mode. Below is the code snippet I have used: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" r ...

You cannot modify a variable inside an event handler function unless it is declared globally in the code

I am facing an issue with my nodejs backend app that uses mongoose for database connections and queries within an event handler of socket.io. Specifically, the problem arises when I try to update a variable within a callback function of a mongoose query in ...

Transfer the address information to the billing address fields

I need assistance with copying the user's address to the billing address fields based on a checkbox value. Currently, when the checkbox is checked, only the last input field value is being copied over to the billing address section. It is crucial that ...

Tips on modifying a particular item within a sub-document array using Mongoose?

Working on my node.js and mongoose project, I have a main Schema and a sub-Schema set up. const childrenSchema = new mongoose.Schema({ name: { type: String, required: true, trim: true }, hobbies: [String] }) const parentSchema = new mongoose.Schema({ ...

Import data from a distant file into a node Buffer within the web browser

Currently, I am utilizing browserify to utilize this particular package within the browser. Specifically, I have developed a phonegap application that retrieves .fsc files from the server. The code snippet looks like this: var reader = new FileReader( ...

Leveraging async/await to handle the insertion of SQL data

function Scan_Insert_Recursive (dir_path) { //scans dir_path recursively and inserts file path into a temporary list Scan_Recursive(dir_path, (err, files) => { //using npm recursive_readdir for scanning if(err) { console.log(err) ...

Dealing with Laravel and AJAX - Issue with Loading DIV

I find myself in a perplexing situation. Despite not encountering any errors in my apache logs or browser (chrome), I am faced with an issue that has left me baffled. On a specific page (localhost/admin/networks), I can click on an item from a database-ge ...

What is the best way to recycle Vue and Vuetify code?

<script> export default { data () { return { my_alert: false, text: '', color: 'success' } }, methods: { openAlt (text, color) { this.text = text this.color = color this.my_ale ...

Building a DIV Element in the Space Between a Header and Footer Using HTML and CSS

I'm attempting to get my DIV element (MainPageImage) to cover the entire screen area, situated between the header and the footer. Here's my HTML code: body { padding: 0; margin: 0; overflow-y: scroll; font-family: Aerial; font-size: ...

Tips for linking my TypeScript document to the server

Recently diving into the world of Angular 2 and seeking to grasp its intricacies. Currently utilizing Visual Studio Code. How can I have the server monitor changes in the TypeScript file? Do I need a compiler to convert it to JavaScript for this purpose? ...