Creating a main navigation menu

In search of: creating a basic links/navigation bar.

My CSS snippet:

.ico    {
    width:40px;
}

The HTML code I currently have:

<body>
 <div id="logo">
 <img src="logo.png" id="test" />
 <img class="ico" src="images/home.png" />
 <img class="ico" src="images/calendar.png" />
 <img class="ico" src="images/support.png" />
 <img class="ico" src="images/globe.png" />
 <img class="ico" src="images/email.png" />
 <div style="width:auto; border-style:solid; border-width:0px 0px 3px; border-color:#202020;"></div>
 </div>
 <div id="main">
 <h1 class="title">This is the main title</h1>
 <p>This is a sample paragraph.</p>
 </div></body>

This is how it appears: https://i.sstatic.net/5pSNT.png

What needs to be done: Ensure that the images (home, calendar, support, globe, email) are evenly spaced and stretch from the start of the logo (DAERA) to the edge of the screen, regardless of screen size or device.

Answer №1

Here is a suggestion that might be beneficial to you. Your HTML structure:

<section class="container">
  <article></article>
  <article></article>
  <article></article>
</section>​

And your corresponding CSS code:

.container{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

Answer №2

.icon {
    width:30px;
    margin-right: 20px;
}

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

Do you have to change the style of each individual element using JavaScript, or is there another method to accomplish this?

Recently, I've been exploring different ways to use JavaScript to globally adjust styles. My goal is to modify the CSS rule that controls the element's style, similar to how you can do it using the Inspector in Webkit. However, after visiting htt ...

How to align several lines of text in a table cell

I've been trying to center multiple lines of text in a table cell using the table method, but no matter how many online guides and SO posts I follow, I just can't seem to get it right. What I'm aiming for is to have the text perfectly cente ...

Utilizing BEM Class Names in React

How can I utilize the Post component in a way that assigns unique classes to new and old posts following BEM recommendations? Assign a unique className to every element Avoid cascading dependencies like (.posts-new post or .posts-old post) Each component ...

Animating path "d" with ReactJS and SVG upon clicking in FireFox

Visit this CodePen for more: https://codepen.io/sadpandas/pen/xxbpKvz const [currentScreen, setCurrentScreen] = React.useState(0); return ( <React.Fragment> <div> <svg className="theSvg" width="156" height="6 ...

Problem with Bootstrap 4 grid specifically occurring in Safari browser

After creating a website using Bootstrap 4, I encountered an issue where every column in a row starts on a new line instead of wrapping to the previous one when the number of columns is equal to 12. This problem seems similar to flexbug#11, and attempts to ...

Convert JQuery to a click event

I have a code snippet that is currently functioning properly $(window).load(function(){ $(document).ready(function(){ $("input[name ='_sft_product_cat[]']").parent().next(".children").css("background", "yellow"); }) }); My goal is to convert th ...

Tips for deleting a CSS class from a Wicket element

If you're looking to dynamically update a CSS class of a component in Java code, one way to do so is by using an AttributeAppender: component.add(new AttributeAppender("class", true, new Model<String>("foo"), " ")); You can also utilize a util ...

The function Document.Open() is not functioning correctly

As I work on my webpage, I am having an issue with a button. This button should notify the user if their username and password are correct, and then redirect them to another page. However, while the notification works fine, the redirection does not happen ...

Adding CSS classes through the .addClass method - A guide on utilizing linked CSS files

I came across this code snippet and I have a quick question. $(window).scroll(function() { var y_scroll_pos = window.pageYOffset; var scroll_pos_test = 150; // adjust as needed if(y_scroll_pos > scroll_pos_test) { $( "#cssmenu" ).addCl ...

Is it possible to customize bootstrap classes for a unique bootstrap css design?

In my MVC4 project, I faced a situation where I had a global.css class with some classes that conflicted with Bootstrap after adding it. To resolve this, I created a new file called bootstrap_migration.css. In this file, I prefixed the Bootstrap classes wi ...

Place a JavaScript code block within a designated div container

I'm currently working on revamping the appearance of the header area for this website. My goal is to replace the background image with a rectangular JavaScript ad positioned to the right of the logo. However, I've encountered difficulty due to th ...

Interactive CSS animation with a single click

I am in the process of developing a website and have incorporated CSS animations for dropdowns. However, I am looking to change it so that the dropdowns appear on click rather than hover in the submenu. I am struggling to make this adjustment with the curr ...

What steps can I take to expand this on a grander level?

I have a code snippet for a personality quiz, but I'm facing an issue with increasing its size. Here's the HTML code: <h3>1. What is your favorite color?</h3> <input type="radio" name="q1" value="A" /> A. Red. <input type="r ...

Component for editing A-frame frame to mimic div rather than canvas

Looking for a Solution Hello! I have developed a VR scene using A-frame (). Currently, there is a custom component in my scene that reflects the code on a canvas onto a plane within the scene. However, I am interested in modifying the component to reflect ...

Enhancing File Control Validation Feedback with Bootstrap 4-alpha6

I have successfully integrated a new custom file control in my forms and I am pleased with how it looks. Has anyone discovered a way to apply validation feedback (such as success, warning, danger states with icon) to this custom file control? (I wouldn&ap ...

Utilizing HTTPS for all links in the source code of Magento

Recently, I encountered a situation while installing a fresh version of Magento v1.7.0 on my VPS running nginx. After uploading the clean install to public_html, unzipping it, and attempting to run the install by entering my IP (xx.x.xxx.xxx:8086), I initi ...

To enhance the MUI v5 table row, simply apply a border when the mouse hovers

After working on creating a table with Material UI v5, I encountered an issue where I wanted to add a blue border to the table row when the mouse pointer hovered over it. I attempted several methods and did thorough research, but unfortunately, I was unab ...

Ways to incorporate a dictionary into your website's content

I am in the process of developing a website for educational purposes while also honing my web programming skills. On this website, I have encountered some complicated terms that may be difficult for users to understand, so I want to implement a tooltip/mod ...

Creating a personalized look for your website using Rails 3.2 Asset Pipeline, a custom theme

Seeking assistance as I am struggling to get my CSS files loaded correctly in production for my 3.2 RoR app. Despite trying various methods, the files either do not appear or result in a 404 error. My application utilizes a combination of a purchased them ...

Unique design and elements featuring the `width: auto` property for custom fonts

In my current project, I am utilizing the popular 'Open Sans' font family. However, I am encountering a specific issue. The problem arises with buttons and other elements that have width: auto. Upon page load, these elements initially have their ...