Struggling to get the logo to budge

My logo isn't moving within the nav bar no matter what I try. I've attempted using !important and setting various properties, but it remains stuck in place. Can anyone provide insight into what might be causing this issue? Additionally, the text on the nav bar won't change color to black. Thank you in advance.

.top {
  background-image: url("first-background-2.png");
  object-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
  padding-bottom: 300px;
  height: 920px;
}

#logo {
  text-align: left !important;
  opacity: 80%;
  float: left;
  height: 600px;
  top: 60px;
  left: 60px
}

.text {
  padding-right: 20px!important;
  color: black !important;
  font-size: 30px;
  font-weight: bold;
  text-align: right;
  word-spacing: 20px;
}

#topnav {
  background-color: white;
  width: 100%;
  height: 100px;
  padding-top: 60;
  opacity: 60%;
  position: relative;
  top: -1150px;
  display: inline-block;
}
<!docktype html>
<html>

<body>

  <head>
    <style type="text/css">
      body {
        margin: 0;
      }
    </style>
    <link href="edusolut.css" type="text/css" rel="stylesheet">
    <title>Edusolut</title>
  </head>
  <nav id="top bar">
    <div class="top">

    </div>

    <!--    navbar-->

    <div id="topnav">
      <div id="logo">
        <img src="./logo2.png" width="auto" height="162 pt" alt="edusolut logo">
      </div>
      <nav class="text">
        <a class="active" href="#top">Home</a>
        <a href="#news">Training</a>
        <a href="#contact">Contact</a>
        <a href="#about">Service</a>
      </nav>
    </div>
  </nav>

  <!-- end navbar-->

Answer №1

looking to shift it around? Try utilizing the following:

margin-left: (pixel value) margin-right: (pixel value)

In the concept of CSS box model, margins are positioned on the exterior, ensuring a visible adjustment.

If that doesn't work, consider using:

padding-left: (pixel value) padding-right: (pixel value)

Answer №2

To make the text appear black, use the following CSS code:

.content > p{
    color:black;
}

Kindly indicate the exact placement for the logo on the page.

Answer №3

Utilize margin/padding or adjust the positions as needed

Paddings;
padding-left: px;
padding-right: px;
padding-top: px;
padding-bottom: px;

Margins;
margin-left: px;
margin-right: px;
margin-top: px;
margin-bottom: px;

create a div form for your logo;
HTML;
<div class="mylogo">
<img src="whatever.png">
</div>

CSS;
.mylogo { //This is just an example, you can also use absolute positioning to keep your logo fixed in place!
position: relative;
top: px;
left: px;
right: px;
bottom: px;
}
Or try text-align, justify-content, etc 
float: left;
text-align: left;
ETC

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 are some techniques for customizing an iframe?

When incorporating an iframe with prettyPhoto, the code to use is as follows: <a href="stories/story1txt.php?iframe=true&width=400&height=200" rel="prettyPhoto"> <img src="images/story1.jpg"/></a> The contents of the story1txt.p ...

Creating a dual-column checkbox design with CSS only

I'm working with a dynamically generated form element that can only be styled using CSS. I need help achieving a specific layout without making any HTML changes, except for the classes. The "element" and "formField" classes are common and cannot be mo ...

Choose every HTML element of a specific type that appears following a designated element

Is there a way to target all p elements that follow h1, specifically those that appear later in the DOM structure? These p elements may be at the same level as h1 or nested multiple levels deep, rendering selectors like ~ or + ineffective... In this scena ...

The validation of the form fails in Django when form.is_valid() returns false

I'm relatively new to using Django and I'm facing an issue with sending a file to another server after it's uploaded. The problem is that even when form.is_valid() returns false, I can't enter the if statement. views.py- def send(requ ...

Exploring the world of HTML, JavaScript, and baking delicious

I am looking to create a simple cookie using JavaScript in my HTML code. The JavaScript code needs to be stored in a separate file named javascript.js, and in the HTML file, I need to call a function to create and store the cookie. <head> <script ...

Is there a way to include a collapsible button specifically for mobile users?

I am looking to display just the list on large screens without the collapsible button, but I want the button to appear on mobile devices. I have attempted using hidden-lg or visible-xs classes on the button tag, but it ends up removing the entire row for l ...

Guide on executing a function upon clicking the ok button in an alert box in PHP and MySQL

function notify(message) { alert(message); handleAlert(); } function handleAlert() { alert('Alert has been triggered.'); } //I am looking for a way to trigger an update or insert action when the user clicks 'OK' on the alert ...

I am looking to arrange two div elements and one navigation bar into the header, positioning them at the top-left, top-center, and top-right using CSS. How

I'm attempting to arrange three divs within the <header>: div1 (logo) at the top left of the page, nav2 (menu bar) at the top center of the page, and div3 (social networks) at the top right of the page. However, I am unsure of how to achieve thi ...

Making the hidden field in an HTML table by utilizing the value field within the td tag

In order to associate data with a cell in an HTML table, I am considering using the value attribute within the td tag. Are there any drawbacks to this approach? Is there a more efficient way to achieve the same result? For reference, here is an example on ...

Verify whether the document includes a class that closely matches the provided string using Javascript

I need help identifying elements that include the letters 'ad'. For example: <iframe class="container" /> <!-- Not relevant --> <a class="adp" /> <!-- Relevant --> <a class="adleft" /> ...

Determine the total number of rows present in a Selenium web table

I have a web table in a page that only has one attribute, which is the class. I am trying to determine the number of rows in this table. The code below works, but it provides me with the count of all web tables that have their parent class set as OverviewT ...

What could be the reason behind the link only functioning properly on macOS?

I tried accessing a link that works perfectly on Chrome, Safari, and Firefox on MacOS, but when I try to access it from Windows or Android, I get a 404 error in the browser. Here is an example link: This link is part of an m3u8 file, which can be accesse ...

Stopping smart highlighting on mobile email clients like Outlook

After sending a test email to Outlook and opening it in the Outlook iOS app, I noticed that the default style of the text for dates/times appears with its own color. https://i.sstatic.net/iydYd.png (The white/gray part is only to conceal the text, reveal ...

Steps for making a dropdown input field:1. Start by defining a

Is there a way to design a dropdown input using CSS or any other method? Take a look at this image for reference: Any suggestions on how to achieve it? ...

The functionality of my PHP code for email transmission is currently malfunctioning

I'm having trouble sending mail from my HTML form using PHP. I've uploaded the necessary files to my hosting server but the mail is still not being sent. Here is my HTML code: <!-- Form --> <form action="http://example.com/sendEmail.php ...

Exploring how to replicate background-size: cover with a center position using HTML5's <video> tag

Looking to replicate the effect of background-size: cover on a <video> element. I was able to achieve this with the code below: <video id="videobackground" autoplay="true" loop="true"> <source src="BackgroundFinal2.mp4" type="video/mp4" ...

Modifying body width for optimal display on both desktop and mobile devices

I've been experiencing difficulties in getting my pages to utilize 100% width. While it displays properly on desktop, occupying the entire page width, a strange issue arises on mobile devices. I am utilizing NextJS and Material-UI, in case that inform ...

The div reveals a submenu by popping out when its overflow is set to hidden

I am trying to figure out how to create a horizontal menu with sliding option and submenu. The issue arises when I set overflow to hidden for the sliding effect, as it causes problems with the submenu. Any suggestions or ideas on how to solve this dilemma ...

Adjusting the size of content tags depending on their popularity

Currently, I am working on setting up a basic tagging system by following the database structure provided in this Stack Overflow post. My goal is to create a single page that showcases all the tags, with each tag being visually scaled based on its popular ...

The o-gradient feature is not compatible with Mac and Linux operating systems

Hello there! I am facing an issue with creating a gradient on my website without using an image. Surprisingly, the gradient appears on Windows but not on Mac or Linux operating systems. Any idea why this might be happening? You can check out the website he ...