如何排除来自浏览器缩放一些文本 [英] How to exclude some text from browser zoom

查看:149
本文介绍了如何排除来自浏览器缩放一些文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,我知道这可能是一件坏事想做的事情。

Yes, I know this is probably a bad thing to want to do.

我已经转换一个网站的Drupal。我觉得我已经做了相当不错的清洁工作的标记和CSS开始与禅宗主题。所有的字体大小的设置EM。这是一个固定宽度布局。这可能是一个错误的决定,但...我基本上复制了旧网站的设计。

I have converted a web site to Drupal. I think I've done a reasonably good clean job with the markup and CSS starting with the Zen theme. All font sizes are set in em. It's a fixed width layout. That might be a bad decision but ... I basically copied the old site design.

在菜单是一个div里面一个不错的水平微升。其中的一个用户似乎是在用火狐增加缩放文字大小缩放文字只有签或I.E.改变文字大小的习惯问题是,在菜单区的大小是固定所以右手菜单选项掉落端和消失。

The menu at is a nice horizontal ul inside a div. One of the users seems to be in the habit of increasing the text size by zooming with Firefox with "Zoom Text Only" checked or changing the text size in I.E. The problem is that the menu area is a fixed size so the right hand menu options drop off the end and disappear.

旧网站似乎有一些魔术或黑客工具,避免这一点。当缩放文字大小,所有的文字缩放,除了菜单。它保持不变。我捅围绕与萤火虫,但一直没能找到他们是如何做到这一点。客户希望新网站的行为相同的方式。旧网站该菜单是一张桌子,所以我不知道如果表是免疫的字体大小。

The old site seemed to have some magic or hack that avoided this. When zooming the text size, all text zooms except the menu. It stays the same. I've poked around with Firebug but haven't been able to find how they do it. The client would like the new site to behave the same way. That menu on the old site is a table so I wonder if tables are immune to the text resize.

感谢您的任何建议。

推荐答案

究其原因,旧的网站从来没有放大,是因为他使用的图像进行导航。你提到的两个缩放功能不放大的图像上,只有纯粹的文本,因此他们保持不变。

The reason the old site never zoomed is because he used images for the navigation. The two zooming functions you mention do not zoom-in on images, only pure text, so they stayed the same.

与当前的设计的问题是,你正在使用的文字(这可以说是走在正确的方式),但父分区,#main,因为被固定在像素宽度的两列内它是固定的像素宽度。

The problem with your current design is that you are using text (which is arguably the right way to go), but the parent div, #main, is fixed to a pixel width because your two columns inside of it are fixed pixel widths.

真正理想的情况在这里是指定所有布局的宽度在EM的而不是像素。然后,如果用户只缩放字体大小,它也扩展的布局。然而,你的背景图片将不支持。如果你能放弃的阴影和使用的背景颜色来代替,这可能是一个更灵活的解​​决方案。

The truly ideal situation here would be to specify all of your layout's widths in em's instead of pixels. Then, if the users scales the font-sizes only, it also scales the layout. However, your background images won't support that. If you could forgo the shadows and use background colors instead, that might be a more flexible solution.

这篇关于如何排除来自浏览器缩放一些文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆