Mobile view logo alignment issue

Apologies for the beginner question. I purchased a template to work on my skills, but I'm facing an issue with centering the logo on mobile devices that I can't seem to solve.

To make it easier to understand, I've uploaded the code to a domain: .

I would greatly appreciate any advice or suggestions.

Thank you, Vlad

Answer №1

To center align your logo using CSS, you can use the following code snippet:


@media screen and (max-width: 767px) {

  .header-content-one .d-flex {
    display: flex;
    justify-content: center;
  }

  .header-content-one .d-flex a{
    width: 100%;
  }

}

I've added a breakpoint at 767px for smaller screens only. Feel free to adjust this value according to your needs.

Answer №2

It appears that your current CSS is utilizing "display: flex," which may be causing some issues. You might want to consider switching to "display: inline-block" or "display: flex-box" to help steer you in the right direction. For more information, take a look at this helpful article: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

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

Differences in SVG rendering between Chrome and Firefox

I am eager to create a diagram on my website using SVG. To ensure the diagram is displayed in full screen, I am utilizing availHeight and availWidth to determine the client screen's height and width, then adjust the scaling accordingly. My current sc ...

What is preventing the table from extending to the full 100% width?

Displayed above is an image showing an accordion on the left side and content within a table on the right side. I have a concern regarding the width of the content part (right side) as to why the table is not occupying 100% width while the heading at the ...

Box-sizing:border-box causing CSS padding problem in Firefox

Something strange is happening in Firefox, it seems like the debug console is not telling the truth or there's something I'm not seeing. Here's the CSS for the body tag: html, body { width: 100%; } body { padding: 5% 10% 0 10%; ...

The smooth scroll feature is not functioning properly on the animated mouse-scroll down button

I've recently added an Animated Mouse Scroll Down button on my website. However, when I click the button, the smooth scroll feature is not working as expected. Important Note: I already have a separate button for navigating to the next section where ...

Event handlers for textboxes in Visual Web Developer are a crucial component for

Having some difficulty with textboxes - ideally, I would like my second textbox to clear whenever the text in my first textbox changes. Currently, it only clears on postback but is there a way to achieve this without needing a postback for each character ...

Dealing with an undefined variable problem in CodeIgniter

My current issue involves loading photos from the database using a for each loop to display each photo in a formatted div. However, I keep encountering an undefined variable 'imgres' and I am uncertain as to why. Here is the corresponding view c ...

How can data be transferred between web pages using jQuery or JavaScript?

Imagine having two different pages on a Classified car website: The first page is the search page, which displays a list of all cars. Check out a sample search page here The second page is the details page, where you can find specific information about a ...

The Javascript function will keep on executing long after it has been invoked

I am currently facing an issue with calling a JavaScript function within an AJAX call. The progress function below is supposed to be executed every time the for loop runs. However, the problem is that although progress is being run as many times as the for ...

Is it safe to exclusively use CSS Selector [type="text"] instead of input[type="text"]?

I've been pondering the safety of exclusively using [type="text"] instead of input[type="text"] in CSS. My concern is that when using input[type="text"], I'm unable to override it with a single class selector. // HTML <input type="text" clas ...

Disappearing Into the Background Excluding Specific Divs

I have a dilemma with fading in and out a background image using jQuery fadeIn and fadeOut. The issue arises because my wrapper div contains elements such as sidebar and navigation that are positioned absolutely within the wrapper div, causing them to also ...

The Vue.js component is only refreshing after I manually refresh the browser page

As a newcomer to Vue.js and other reactive frameworks, I am still learning the ropes. I have a component that needs to update whenever there is a change. The goal is to display a balance from a specific login. <li :key="balance">Balance {{ balance ...

What is the best way to prevent the registered symbol from showing an underline?

I need help figuring out how to display part of a word with an underline, and part of it without. Specifically, I want the "registered" symbol to not have an underline. Here is the HTML code snippet: <h3>Basecamp<span class="sup">&reg;< ...

Guide to activating a reaction following an occurrence in a React component

I have started developing a React application that loads blog posts along with their associated comments. The challenge I am facing is how to trigger a refresh of the comments component and display the new comment immediately after it has been submitted. ...

Saving information on localStorage is not possible

Recently, I created a demo for a basic Login and Logout application that utilizes an access token. If a user attempts to access another page without logging in (meaning the access token is null), they are redirected back to the Login page. Initially, I use ...

Unable to find any interactive elements on the page

When I visit this website, I come across a chart. I am able to locate the chart boundaries element using //div[@data-chart_id='product_cannabinoids'], but I cannot find the rect, svg, or g elements inside it. Even though I can see these eleme ...

Sending JavaScript variables to an ArrayList in a Java servlet

For instance, Let's say we have the following table: <table> <tr> <td>john</td> <td>doe</td> </tr> </table> This table can be dynamically generated. I am extracting values from the table using this ...

Tool to stop automatic logouts on websites

In the web application where I work, users are automatically logged out after a period of inactivity. Unfortunately, I am unable to control this feature. The code responsible for logging the user out is as follows: var windoc = window.document; var timeou ...

Master the art of navigating the Windows Sound Recorder with the power of JavaScript

I am creating a project that involves controlling the Windows sound recorder for tasks such as starting, stopping, and saving recordings. Is there a way to do this without displaying the recorder window? I would appreciate any assistance in solving this. ...

"Can you provide me with advice on how to pass a path to fs.createReadStream

I'm new to node.js, so please bear with me if this is a basic question. I have created a script that writes data to a file and then uploads it to Slack. Here's how the data is written to the file: let myFile = '/tmp/' + Date.now() + & ...

Instructions for creating a select box with checkboxes:

I am currently working on incorporating a Selectbox that includes checkboxes within the selectbox itself, similar to the image shown below. However, I am encountering an issue where clicking on the select box does not open the checkboxes from another div. ...