Arrange list items in a circular pattern

Is there a way to achieve the desired appearance for my navbar like this link? I have tried rotating the text, but the vertical text ends up too far from the horizontal. Any suggestions?

  .vertical {
    float:right;
    writing-mode:tb-rl;/*IE*/
    writing-mode:vertical-lr;/* OPera/webkit*/
    writing-mode:sideways-lr;/* should be the one */      
  }
  .horizontal {
    float:right;
    line-height: 0em;
    
      
  }
  li {
    display:inline-block;
<nav>
    <ul class="horizontal">
        <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><i class="far fa-circle"></i></li>
    <ul class="vertical">
        <li><a href="#">Clients</a></li>
    <li><a href="#">Contact Us</a></li>
    </ul>
    </ul>
</nav>

https://i.sstatic.net/3hCM5.png

Answer №1

One possible solution is to avoid nesting ul elements and instead use display:grid, or alternatively, display:inline-block +float if grid is not an option. You can also consider using shape-outside for content wrapping.

* {
  margin: 0;
  padding: 0;
}

nav {
  float: right;
  shape-outside: polygon(0 0, 0 15%, 75% 15%, 75% 100%, 100% 100%, 100% 0%);
  /* requires a floatting element */
  margin-left: 1em;
  background: black;
  color: white;
  clip-path: polygon(0 0, 0 15%, 80% 15%, 80% 100%, 100% 100%, 100% 0%);
}

ul {
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: repeat(3, auto);
  justify-content: end;
  list-style-type: none;
}

li {
  padding: 0.5em 0 1em 1em;
}
ul li:nth-child(3){
padding:0.5em;}
ul li:nth-child(3)~li {
  grid-column: 3;
  writing-mode: vertical-lr;
  /* should be enough now-days*/
  padding:0 0.5em 1em;
}

a {
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  color: inherit
}

p {
  text-align: justify;
}

p:nth-child(odd) {
  background: #bee;
}

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

Webpage refreshing when resizing browser

Hey there, I'm facing an issue where my HTML website restarts whenever the browser size changes. Can someone please help me fix this? You can check out my website here I have uploaded my code files here: Code Files Link ...

Two variations of identical descriptions within a single div container

Is there a way for me to use an item, specifically an img, within the same div class but with different definitions? For example: section .row img { margin: 0 0 30px; width: 100%; border: 4px solid #18a00e; } section .row img { margin: 0 ...

Obtain the URL path for accessing URL links using PHP

To obtain the URL of an image, I typically use this code on the main websites: <a href="./index.html"><img src="./images/logo.png" class="" alt=""></a> However, for sub-sites, I need to use a slightly different approach: <a href=".. ...

How can I submit a form using ajax and retrieve the data as an array?

Hey there, I need some help on how to submit a form and receive data in the form of an array like this: { "notes":'some notes', "validUntil": '12/12/2015', "status": 1, "menuItemName": "HR Section", "menuItemDesc": "gggg" } Here is th ...

Crop box overlaying video background

Utilizing jCrop to establish a crop region for a video element. My goal is to make the video section within the crop area fill a container with identical proportions, but I'm encountering challenges with the mathematical calculations. The sizes of th ...

Issue with Twitter Bootstrap 3 Sticky Footer functionality in IE11 and IE Edge

My website works perfectly on Chrome, but I'm having issues on Internet Explorer. I would really appreciate your help. The website I am working on is: I am trying to implement a sticky footer on IE, but for some reason, it's not working as expe ...

The backend is serving HTML content, but the frontend is not initiating any redirects

After hitting an API endpoint and examining the network call responses, I identified that the HTML response returned with a status code of 302. Despite this, I am perplexed as I do not witness the expected redirect on the user interface. The intended redir ...

Select the radio button by hovering the mouse over it

Is there a way to check my radio buttons when hovering over them without having to click? I want to display photos based on the selected radio button. I attempted this using JQuery, but I am still learning and consider myself a beginner. ...

Animating transitions on a dynamic Bootstrap navbar using jQuery

I have the code attached here, and I successfully changed the color of the navbar and logo when scrolling down. However, I am looking to add a transition effect when this change occurs. I experimented with various transition options in CSS, but unfortunat ...

Having trouble setting up a page layout with CSS grid or grid-template-areas

Hey everyone, I'm a beginner in the world of HTML, CSS, and JS and this is my first time reaching out for help. I've been searching through various forums and spending quite some time on this particular issue, but unfortunately, I haven't fo ...

Modify the background color of a div by selecting a hex code from a dropdown menu

Is there a way to utilize jQuery in order to alter the background of a <div> by choosing the HEX code from a separate dropdown menu? HTML <select id="target"> <option value="#c2c2c2">Grey</option> <option value="blue">Bl ...

Style the modal body to display as a block on both desktop and mobile devices using CSS

My goal is to ensure that the modal-body is vertically aligned for optimal visibility on both mobile phones and PCs. I am utilizing bootstrap for this purpose. <div class="modal-body" style="display: inline-block;"> <div> ...

Troubleshooting Bootstrap image alignment problem with columns on extra small screens

My website showcases screenshots of my software in a div element. Everything looks great on larger screens, but once I switch to a phone or resize the window, the images don't align properly, leaving empty space. Refer to the image below for clarifica ...

What setting should I adjust in order to modify the color in question?

Looking to Customize Radar Chart Highlighted Line Colors https://i.sstatic.net/PqWc4.png I am currently working on a Radar Chart and I am trying to figure out which property needs to be edited in order to change the color of the highlighted lines. I have ...

What is the best way to remove a border piece with CSS?

Currently, I'm attempting to achieve a matrix effect purely through HTML and CSS. One method I have come across involves applying a solid border and then removing certain parts at the top and bottom. Does anyone know if it's possible to create th ...

The appearance of the page varies between Ubuntu and Windows 7 when viewed on Firefox 31

This situation is completely new to me: The page I designed appears differently on Firefox 31 in Ubuntu (correct): compared to Windows 7 (wrong): I was able to replicate this issue on another Windows 7 machine using FF 31. My HTML and CSS both validate w ...

Issue with form action failing to properly refresh

I'm encountering an issue with form submission. I have an HTML form, but the action doesn't seem to be working properly. Could you take a look at it and see if there's anything I'm missing? <form action="add.php" method="post" autoc ...

SWI-Prolog and the Selection drop-down element in HTML

Is there a way to convert this code into SWI-Prolog? I couldn't find any information online on how to write the select statement in Prolog. Can you also provide guidance on making the PHP code function properly within the context of SWI-Prolog? <s ...

"Exploring the vibrant world of colors with Colorbox: a

In one of my projects, I am utilizing colorbox to create a video gallery. One feature I am trying to implement is to display the video description underneath each video when opened in the colorbox modal. Currently, here is what I have: <script> $( ...

Is it possible to change the hover highlight rotation on a link without affecting the surrounding elements?

Is it possible to rotate the highlight on a link when hovered? I'm new at this, so apologies if this question seems basic. This is how my css/html is currently structured: .links { display: block; } .links a { color: #000000; text-decoratio ...