Resizing and adaption of Div elements

There's a challenging issue I've been facing and I can't find a way around it.

What I'm trying to achieve is a responsive design where both the menu and text resize seamlessly when the resolution changes or when there's a zoom in/out. Although the images and content divs adjust properly, the menu seems to be the stubborn one that won't adapt.

If anyone could offer some assistance with this, it would be greatly appreciated.

Here is how it looks in the normal view:

And here is how it appears in the zoomed view:

The structure of the menu is as follows:

<a href="nissan-s13-project.html" title="The Project">The Project<span class="desc">Full description</span></a>

Along with the corresponding CSS:

a .desc {
    display: none;
    text-transform: lowercase;
    font-size: 1em%;
    color: #FC0;
    max-width: 100%;
    z-index: 1;
}

a:hover .desc, .active .desc {
    display: block;
    font-size: 1em;
    max-width: 100%;
    z-index: 1;
}

At this point, I'm at a loss for what else to try.

Also, the text is styled as:

#content p {
    margin: 1.2em 1.2em 2em 1.2em;
    font-size: 0.8em;
    line-height: 1.8em;
    max-width: 100%;
}

Answer №1

Ensuring that your text remains a consistent size even when zoomed in can be a tricky task. While it may seem counterintuitive, users who zoom in on a page often do so because they need larger text to read. For more information on why preventing font resizing can be problematic, check out this helpful resource: Stop Font Resizing: A Comprehensive Guide

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

updateStatusCallback function is not defined in the Facebook example using jQuery

I've been trying to incorporate Facebook integration into my HTML code, specifically adding features like Facebook login and sharing functionalities. However, I've hit a roadblock in the process. Even after searching extensively for solutions, I ...

Resizeable drag and drop two-column design

Experimenting with creating a drag re-sizable layout using jQuery UI was quite an interesting challenge for me. If you want to check out the result, here is the link. However, my original goal was to achieve something different from what I ended up with. ...

The elements from base.html and the extended page are now placed on separate rows rather than on the same row

I'm relatively new to HTML, Jinja, and CSS and have been playing around with creating a webpage that retrieves data from a sqlite3 database. As of now, I am facing some challenges regarding formatting. To assist with table formatting and overall aest ...

What is the process for activating a button after a checkbox has been selected? Additionally, how can a value be dynamically transferred from a checkbox to the rezBlock_1 block?

What could be the reason for my code not functioning properly? How can I enable a button once a checkbox is selected? Also, is there a way to dynamically move text from a checkbox to the rezBlock_1 block? CODPEN https://codepen.io/RJDio/pen/RwPgaaZ doc ...

Updating all the direct components within the corresponding category with jQuery

Here is the HTML content I am working with: <li class="info"> info<li> <li class="other"> info<li> <li class="other"> info<li> <li class="Error"> error<li> <li class="other"> error<li> < ...

Distinct "namespaces" within HTML

Recently, I've encountered an issue with my application that is causing ID collisions. The application uses AJAX to dynamically load code snippets based on user demand. Although these snippets vary significantly, there are instances where a code snipp ...

Using jQuery to Generate an Automatically Updating Timer for Slideshow - Pausing on Mouse Click

My first slideshow with jQuery is up and running, but it's very basic and hard coded. I want to add an automatic scrolling effect every 8 seconds to the next item before looping back to the beginning. I have an idea on how to achieve this, but I want ...

Unable to stack a div on top of a chart's div in HTML + (NV)D3 despite using a higher z-index value

I am facing an issue with my HTML and CSS code. Here is what it looks like: <div id="container"> <svg id="chart1"></svg> <div id='logo'> <img id="logo" src="cubs_best.png";> </div> </div ...

Revamp every single hyperlink that ends in .html

I am looking to customize the URLs on my website to appear like this: www.example.html/1 www.example.html/2 www.example.html/3 instead of their current format: www.example.html/1.html www.example.html/2.html www.example.html/3.html Can anyone provide a ...

It appears that the jQuery this() function is not functioning as expected

Despite all aspects of my simple form and validation working flawlessly, I am facing an issue where 'this' is referencing something unknown to me: $('#contact').validator().submit(function(e){ e.preventDefault(); $.ajax ...

What are the steps to converting one grid to another solely with the use of Bootstrap utilities?

https://i.sstatic.net/SuGiM.png I am looking to convert the grid layout shown above into the grid layout displayed below. To achieve the above layout, I have used the following grid structure: <div className="row"> <div className=&q ...

Trying to display logo using 'content' property in CSS

I've been trying to display a logo on the header of my website, but I'm having trouble getting it to show up. I attempted to set the logo using HTML syntax as well as the following CSS code: .div { content: url (...jpg); } However, both metho ...

How can I use CSS to make a child element in a grid layout stretch horizontally to full width?

I am currently working on designing a grid layout that will display a child element when clicked. Here is what I have in mind: [ link1 ] [ link2 ] [ link3 ] [ link4 ] [ link4 ] [ link4 ] When clicked, it will turn into: [ link1 ] [ link2 ] ...

Creating an image using tiles in HTML

I have divided an image into 48 tiles (8x6) using a method similar to "Cutting an Image into 9 pieces C#". Now, I want to reconstruct the original image in HTML. What is the most effective approach to achieve this? Initially, I attempted to use a table wi ...

Adjust the height of an element when the maximum height is set to none

I am trying to add animation to the opening of a menu on my website. This is achieved by adjusting the max-height property of the <div> element that represents the menu, as well as changing the display property. The max-height value is being changed ...

What is causing my 100% height to be excessively large?

I'm facing an issue with my background containers, "background-overlay" and "background-gradient", as they are extending the height of the document beyond the actual content displayed. I am unsure of what could be causing this problem. It might be som ...

Grid of domes, fluid contained within fixed structures and beyond

I've been grappling with this issue for a while now, and have had to rely on jQuery workarounds. I'm curious if there is a way to achieve this using CSS or LESS (possibly with javascript mixins). The page in question consists of both fixed and f ...

Having trouble with uploading images?

I'm having issues with using PHP to upload an image to a folder. Can someone please help me troubleshoot this? Thank you! Here is the code for setup.php <?php include("../includes/config.php"); ?> <?php if ($_SESSION["isadmin"]) { ...

Can you explain the distinction between [att|=val] and [att~=val] in css?

Could someone help me differentiate between the [att|=val] and [att~=val] attributes in CSS? I'm having trouble grasping the concept. Thank you! ...

There was a problem compiling the template and an error occurred in the mounted hook

I am encountering a slight issue with testing Vuejs and I am unsure how to resolve the error. Error1: "[Vue warn]: Error compiling template: Component template should contain only one root element. If you are using v-if on multiple elements, use v-e ...