Arranging particular placement

How can I position my links to the right of the second photo (opus1) and slightly below the first photo (coverPhoto)? I've tried various methods but haven't found a simple solution yet.


    <!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8" />
    <title>Opus</title>
    <link href="opus.css" rel="stylesheet" type="text/css" />
    <div class="logo">
    <img class="coverPhoto" src="images/coverPhoto.jpg" alt="Cover Photo" height="300" width="1330">
    <img src="images/opus1.jpg" alt="Logo" height="500" width="600">
    </div>

 <body>

    <div class="nav">
        <ul>
            <li id="home"><a href="#"> Home</a></li>
            <li id="about"><a href="#"> About</a></li>
            <li id="more"><a href="#"> More</a></li>
        </ul>
    </div>

 </body>

 </head>

CSS

body {
    background-color: rgb(104, 0, 1);
}

#home {

}

#about {

}

#more {

}

li {
    display: inline-block;
}

ul {
    list-style-type: none;
    text-align: center;
}

Answer №1

1) Place the <div class="nav"> inside the <div class="logo">:

<div class="logo">

<img class="coverPhoto" src="images/coverPhoto.jpg" alt="Cover Photo" height="300" width="1330">
<img src="images/opus1.jpg" alt="Logo" height="500" width="600">

<div class="nav">
<ul>
<li id="home"><a href="#"> Home</a></li>
<li id="about"><a href="#"> About</a></li>
<li id="more"><a href="#"> More</a></li>
</ul>
</div>

</div>

2) Show both the images and the <div class="nav"> as inline-blocks and add a left float to each:

img, .nav {
display: inline-block;
float: left;
}

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

Unable to apply background-color CSS in playwright is not working as expected

I have been encountering an issue with applying the background-color CSS property in a Python template using the playwright package. I initially attempted to apply inline CSS style="background-color:red", then tried using a script tag with JavaScript, an ...

Restrict the number of dynamic form elements to a maximum of 10 entries

I am working on a feature where users can refer their friends and the data will be saved in a database. <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type='text/javascript' sr ...

Using AJAX to Access PHP Variables

I am working on creating a progress bar and have the following CSS code: #result{ background:#8c8f91; margin-left: 15px; margin-right: auto; table-layout: fixed; border-collapse: collapse; z-index: -1; position:relative; width: ...

Turning off and on CSS transitions to set the initial position

Is there a way in javascript to position divs with rotations without using transitions initially for an animation that will be triggered later by css transition? I have tried a codepen example which unfortunately does not work on the platform but works fin ...

Ways to assign a boolean value to HTML using Angular?

Can someone help me set the initial value of showProduct to false for the app-product HTML selector? showProduct:boolean = false; <button (click)="showProduct=!showProduct">Show Product</button> <div *ngIf="!showProduct"> <app-p ...

Spree Deluxe - Customizing color scheme variables

We're struggling to modify the color variables in Spree Fancy. The documentation suggests creating a variables_override.css.scss file. But where exactly should this file be placed? We've tried adding it under the stylesheets folder in assets and ...

Bootstrap3 and jQuery are attempting to achieve vertical alignment

I am trying to vertically align Bootstrap col-md* columns. I have two blocks, one with text and one with an image, and I want them to be equal in height with the text block vertically centered. My current solution is not working correctly. Can someone plea ...

The action to set the 'isRightSidebarExpanded' property is trying to target an undefined element

I'm currently in the process of adapting a template for use with nuxt.js This specific attribute is causing an error to occur When trying to set 'isRightSidebarExpanded', I receive the following error: Cannot set properties of undefined ...

CSS for mobile devices not loading until the device is rotated

My website, redkrypt.com, is functioning perfectly on my laptop. However, I am facing an issue where the css file will only load on my iPhone 4S after I rotate it once. Once I do this, the website works both vertically and horizontally. I have tried variou ...

Changing color of navigation bar link upon refreshing the page using Bootstrap

I am new to the world of HTML/CSS/Bootstrap and recently made a change to the color of a link on the navbar. However, I am encountering an issue where the original blue color of the link briefly appears when I refresh the page. I would like to prevent this ...

Main navigation category as parent and secondary category as a child menu in WordPress

Hello there, I am looking to create a navigation menu with parent categories displayed horizontally and child categories as corresponding submenus. For example, The parent categories would be Apple, Orange, and Mango Under Apple, we would have apple1, ...

Tabbed form design using Twitter Bootstrap

Currently, I am working on a website using the Bootstrap framework. My goal is to create a single page that features a pop-up form with two or three tabs. Specifically, I envision these tabs as "The Markup," "The CSS," and "The JavaScript." While I have ma ...

Deletion of input is not permitted

Currently, I have a telephone input field on my form that only allows numbers. I have implemented a simple JavaScript code to enforce this validation. However, the issue I am facing now is that the input box cannot be deleted. <form id="aylikal" action ...

Is there a way to automatically load data whenever a specific inner div on an HTML page is modified?

On my website, I have created a main page with three divs: header, footer, and main. The header div contains buttons that change the content of the main div when clicked. Rather than reloading the entire page, only the main div is updated with a new HTML p ...

What is the best way to position this container in the center of the

Is there a way to perfectly center this container both vertically and horizontally? I've attempted the method below without success. Unsure of what is missing: HTML: <div class="box"> <p>This is a sentence.</p> </div> C ...

The compiler throwing an error claiming that the indexOf method is not a valid

Currently, I am working on a simple form that collects user input and aims to validate the email field by checking for the presence of "@" and "." symbols. However, every time I attempt to run it, an error message stating that indexOf is not a function p ...

Find a solution for displaying custom product badges

Having some issues with a custom product badge on my website. I tried adding a new badge (besides "Sale"), but it seems to be displaying in the wrong position. The badge should display as "Choice" on the featured products, so I added this code to the chil ...

Adjust the height of column divs to equal the height of their parent container

Looking for a solution: I have multiple divs in a column layout and I want them to expand to match the original height of the parent. The parent's height is not fixed as it is part of a flex-based page design. Can this be done? In the example provid ...

Firefoxi is the only browser that exhibits strange padding and margin behavior

Check out this webpage at: www.bit.ly/1b4dUqs Most browsers display the page correctly, but there seems to be an issue with Firefox's (latest version) handling of margin-top/padding-top styles. If anyone has a solution for this problem, please share ...

AngularJS - directive template is not being compiled correctly

I am facing an issue with AngularJS. .directive('field', ['$routeParams', function($routeParams){ return { restrict: 'E', compile: function(tElement, tAttributes) { var template ...