Discussion: Menu
In the previous quiz, Online HTML and CSS Quiz, we tested our experience gained from the course.
Member
9 messages from 9 displayed.
//= Settings::TRACKING_CODE_B ?> //= Settings::TRACKING_CODE ?>
In the previous quiz, Online HTML and CSS Quiz, we tested our experience gained from the course.
Hi, you have to use the :hover
CSS selector and provide which
style should be applied to the highlighted item. I suppose you use
li
elements for menu items, so your CSS will look something like
this:
ul.menu li:hover {
color: red;
/* other styles... */
}
See this lesson if you need help with coding your menu: https://www.ict.social/…and-entities and the following lesson if you need further help to style it.
I know how to make hover, but I don´t know how to make green rectangle. I know how to make with img, but it doesn´t function the hover effect.
I did´t write it, I know ...
You can use the :hover
selector with images as well, you just
have to use them as backgrounds:
ul.menu li:hover {
background: url('images/menu_background_hover.png');
/* other styles... */
}
I can't imagine how you'd add button labels on img
elements
anyway, the images should be backgrounds:
ul.menu li {
background: url('images/menu_background.png');
width: 100px;
height: 50px;
/* other styles... */
}
Yes, but when I use image it wil only for 1 example, but I need it for changing numbers of item. So, i need to make that green rectangle only with css and no image.
I'm afraid I don't know what you mean. You can use as many images as you want if you mean this, just assign a different class to each item.
If you want to use a pure-css solution, there could be a way of creating a div ellipse above the menu. I'd try to make its background white and the border green. Then disable the top borders. You'll end with that green rounded line which will cover the upper part of the green menu items if positioned correctly. However, the elliptic border won't change the color on hover, only the green background will.
I'd go with images.
Choosing a custom software development company is one of the most important decisions you will make for your business. There are a number of reasons for choosing this route, but the main one is the need for your software to be unique. While readymade solutions may include all the features you need, a custom solution https://mlsdev.com/…augmentation will be tailored specifically to your needs. This means that you will pay more for a customized solution than you would for a readymade version, but the benefits you receive will far outweigh the costs.
9 messages from 9 displayed.