<%@ Page Language="C#" AutoEventWireup="true" CodeFile="top.aspx.cs" Inherits="top" %><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script type="text/jscript" src="jsinc/MdiWin.js"></script><title>top</title> <style type="text/css"> .all { left :0px; top: 0px; height: 66px; width: 100%; } #imglogo { left :0px; top: 0px; height: 66px; width: 213px; } </style></head><form id="top" runat="server"><body><div class="all" > <div id="imglogo"><img alt="logo" src="images/logo.jpg" /></div></div></body></form></html>
<div> <a href="#" target="_blank" >反馈建议</a> | <a href="">帮助中心</a> | <a href="#" >退出</a></div>
.all {position:fixed}
If it is to appear In the upper right corner of the all div, use absolute positioning. Define the all div as relative or absolute, then set the upper right div to absolute, and then set the top and right values. I don’t know if this is what you want
You don’t need to specify the address. What I want is that no matter how the window changes, the div should always be in the upper right corner
. The original poster specified that left and top are the same. This place is only used for positioning. So if you use absolute positioning, use position: to set it. If you don’t want to use absolute positioning, use float to float. There is no need to set left top
The complete code is as follows:
The complete code is as follows: