Table of Contents
Reply to the discussion (solution)
Home Web Front-end HTML Tutorial css implements the DIV lower function, but the link offset occurs on the mobile phone's Firefox browser_html/css_WEB-ITnose

css implements the DIV lower function, but the link offset occurs on the mobile phone's Firefox browser_html/css_WEB-ITnose

Jun 24, 2016 pm 12:26 PM

Very strange, it can be used normally on PC Firefox, IE browser and iPhone browser

But when the mobile Firefox browser is opened, although the page layout is displayed normally, the click event of img The position is offset, that is, I have to click on the upper left position of the original image to trigger the onclick event

CSS part

<style type="text/css">.shape{width: 100%;  height: 100px; position:fixed!important; position:absolute;bottom:5px!important; bottom:auto; top: expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop+(documentElement.clientHeight - this.clientHeight):document.body.scrollTop+(document.body.clientHeight - this.clientHeight));}</style>
Copy after login

BODY part
<div id="top" class="shape" >	<table width="100%" background="pages/wap/images/06.gif" border="0" align="center" cellpadding="0" cellspacing="0">      <tr>        <td width="25%"><div style="text-align: center;"><img src="pages/wap/images/08.gif" width="55" height="49" onclick="goHome();"/></div></td>        <td width="25%"><div style="text-align: center;"><img src="pages/wap/images/09.gif" width="55" height="49"  onclick="goBack();"/></div></td>        <td width="25%"><div style="text-align: center;"><img src="pages/wap/images/10.gif" width="55" height="49"  onclick="goHelp();"/></div></td>        <td width="25%"><div style="text-align: center;"><img src="pages/wap/images/11.gif" width="55" height="49"  onclick="goLogin();"/></div></td>        </tr>    </table></div>
Copy after login




Reply to the discussion (solution)

Try setting the img format to display=block. . .

The writing is really a bit wordy. . .

I forgot to mention that the website on the mobile phone is normal when you first click it (that is, it is at the bottom, and clicking the button is effective)

But if there is a lot of content, after dragging down , it appears that although it is still at the bottom, there is no response when clicking the button directly, but if you click on the upper left position of the button, the button event can be triggered

Set the img format to display=block and try it. . .
I tried it but it still didn’t work

I found that if I set height: above 70px, the position of the bottom button to trigger the event will be normal, but even 65px will not work, and what I need is 48


There is a situation: when I add the table to 79px and set the vlign of td to top, it can be used normally: for example, the following code: the first two tds are available, or the two are not, if set When the h of the table is 50, there is a problem with all 4 of them

<table   style="background: yellow;width: 100%;height:79px;border: 0;"    cellpadding="0" cellspacing="0">      <tr>        <td style="width: 25%;height: 49px;text-align: center;vertical-align: top"><a href="javascript:void(0)"  onclick="javascript:alert('主页')" style="font-size: 10">主页</a></td>        <td style="text-align: center;vertical-align: top"><a href="javascript:void(0)"  onclick="javascript:alert('返回')" style="font-size: 10">返回</a></td>        <td ><a href="javascript:void(0)"  onclick="javascript:alert('刷新')" style="font-size: 10">刷新</a></td>        <td ><a href="javascript:void(0)"  onclick="javascript:alert('退出')" style="font-size: 10">退出</a></td>      </tr>    </table>
Copy after login

Then you have to keep working hard. I'm sorry to say that I can't help! !

Not very familiar with mobile terminal development~~~

Come on, come on,

The BUG effect has been restored successfully, website:
http://heavens.duapp.com /webpage/wapindex.jsp
There is no problem when you first click on it. If you click to jump to a page with the same content, the problem will be restored [even if you use a hyperlink to return, the problem still exists]

Yes Friends who are interested can use Firefox mobile browser to test it

Even if the style is completely removed, the same thing is still the same. Is it a problem with FF?
http://heavens.duapp.com/webpage/test.jsp

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head>	<title>基本无样式的情况</title>	<base href="<%=basePath%>">    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />	</head>   <body style="background-color: #1863C7;"><table>   <tr><td><a href="webpage/wapindex.jsp">返回</a></td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr>  <tr><td >很多内容</td></tr></table><table   style="background: green;height: 59px;">     <tr>       <td valign="top"><a href="javascript:void(0)"  onclick="javascript:alert('主页')" style="font-size: 10">主页</a></td>       <td ><a href="javascript:void(0)"  onclick="javascript:alert('返回')" style="font-size: 10">返回</a></td>       <td ><a href="javascript:void(0)"  onclick="javascript:alert('刷新')" style="font-size: 10">刷新</a></td>       <td ><a href="javascript:void(0)"  onclick="javascript:alert('退出')" style="font-size: 10">退出</a></td>     </tr> </table></body></html>
Copy after login

It’s a BUG problem in Firefox - -!
http://mozilla.com.cn/post/59172/

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

See all articles