Home > Web Front-end > HTML Tutorial > How to drag to the middle? ? _html/css_WEB-ITnose

How to drag to the middle? ? _html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:21:37
Original
933 people have browsed it

I am new to Dreamweaver. I want to drag the in the upper left corner to the middle of the picture. How should I do it? ?
If you pull it directly, it won’t work. .
In other words, how should the code be changed? ? ?


login.css:

/* CSS Document */body{	position:absolute;	left:318px;	top:426px;	width:582px;	height:364px;	background-image:url(../images/log.gif);	background-position: center;	background-repeat: no-repeat;	background-attachment: fixed;}
Copy after login


login.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>login</title><link type="text/css" rel="stylesheet" href="css/login.css" /></head><body><html>	<div>		user:<input name="text" type="text" />	</div></html></body></html>
Copy after login


Reply to discussion (solution)

How to use Dreamweaver to pull it, control it, or how to change the code? ?

Why did you write absolute in the body? It should be written in the div... It's OK to add a floating flow... I don't know how big your background image is!

Add a class attribute:
Method 1:.userName{position:absolute;left:300px;top:250px;}
Method 2: .userName{float:left;margin-left:300px;margin-top:250px;}

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template