HTML notes only apply to personal

Source: Internet
Author: User

How do I align a picture with a text box

Actually give add an attribute align= "Absmiddle"

<form method= "POST" action= "english.asp" >

<input type= "text" name= "title" onfocus= "this.value=" "value=" Please enter the word ">

<input type=image src= "http://blog.163.com/[email protected" align= "Absmiddle" >

</form>

Problems in 3.UL

To set the width of a block in a connection

It's best to give it in a.

4.a instead of UL navigation

<div id= "Menu" >

<div id= "NAV" >

<a href= "http://dzsw.whicu.com/" > website Home </a>

<a href= "http://dzsw.whicu.com/list/?107_1.html" > File Notifications </a>

<a href= "http://dzsw.whicu.com/about/?108.html" > Contest Process </a>

<a href= "http://dzsw.whicu.com/list/?109_1.html" > Event News </a>

<a href= "http://dzsw.whicu.com/list/?110_1.html" > Style show </a>

<a href= "http://dzsw.whicu.com/about/?111.html" > Contact Us </a>

<div class= "C" >

</div>

</div>

Meun the distance between the left and right distance a in the background Nav is also a block

If there is a vertical bar between the text in a and the background to see the vertical bar on the left or right and then use background-position positioning

For special handling, you're going to have an inline style. It's the simplest and most intuitive.

In a level two or multilevel menu: Make the picture enough to display in the front to add Display:block in the menu; position:relative;

The shadow resolution in the level two menu is:. menu ul Li{margin-right:16px;margin-left:15px;width:105px;line-height:27px;text-align:center; Position:relative;z-index:998;float:left;display:inline;}

This is the result of resolving a block to the right in the second UL. menu ul Li:hover ul{display:block;position:absolute;left:-15px;

In the navigation if there is an extra background in the inline add style in the definition to remove the background, background-iamges:none; ok.

Navigation can use pseudo-connection A instead of UL if there is a layer to contain a

4. The picture also has the question of the text below the picture

<div class= "List" >

<div class= "img" ></div>

<div class= "Img_name" ><a href= "#" > Engineering case List </a></div>

<div class= "Im_a" > Category: <a href= "#" > Engineering case List </a></div>

</div>

OR with UL

Replace

5. Pseudo-Class:

:

6.position is also known as positioning:

Static

The element box is generated normally. Block-level elements generate a rectangular box that, as part of the document flow, creates one or more row boxes in the parent element of the inline element.

Relative

The element box offsets a distance. The element still retains its pre-positioned shape, and the space it originally occupies remains.

Absolute

The element box is completely removed from the document flow and is positioned relative to its containing block. The containing block may be another element in the document or an initial containing block. The space that the element originally occupied in the normal document flow is closed as if the element did not exist. The element is positioned to generate a block-level box, regardless of what type of box it was generated in the normal flow.

Fixed

The element box behaves like the position is set to absolute, but its containing block is the window itself

If there are left and right

Need to float before the last div in this layer

7. How to align the picture with the text

Now in the hand of a CRM page on the left menu, often a touch to change the things about JS on the head, this time is no exception, a few small details encountered how can not solve. One is a div inside the text in front of the small picture is higher than the text, the picture is a CSS style reference background picture, thought you can set some values can control the position of the picture, so that the text in line with the alignment, so he groped to do some adjustment, but has been useless. Tangled a long time later only suddenly remembered a CSS style, you can control the position of the picture and text, but how can not think of it is which style, on the Internet to search for a bit.

With the text next to the picture, found that the picture is higher than the text, the original default is the picture top alignment and text bottom alignment, by setting CSS properties can make the picture and text alignment.

Set the Vertical-align property of each object, property Description:

Baseline-aligns the contents of objects that support the valign feature with the baseline

sub-Subscript for vertical aligned aligned

super-the superscript of vertical aligned aligned

Top-aligns the contents of objects that support the valign attribute with the top of the object

text-top-aligns the text of the object that supports the valign attribute with the top of the object

Middle-aligns the contents of objects that support the valign attribute with the middle of the object

bottom-aligns the text of the object that supports the valign attribute to the bottom of the object

text-bottom-aligns the text of the object that supports the valign attribute with the top of the object

This is set to Text-bottom can achieve the picture and text on the same horizontal line, much better looking

Css+div inside is text and picture Center align

Source: http://hi.baidu.com/lxiangsheng/blog/item/7b53ce088cc4ce38e82488e7.html

<div>

<div> text and picture alignment <span style= "Vertical-align:middle;" ></span></div>

<br>

<div> text and picture alignment <span style= "Vertical-align:baseline" ></span></ Div>

<br>

<div> text and picture alignment </div>

<br>

<div> text and picture alignment <span style= "Vertical-align:bottom" ></span></div >

<br>

<div> text and picture alignment <span style= "vertical-align:sub" ></span></div >

<br>

<div> text and picture alignment <span style= "Vertical-align:super" ></span></div >

<br>

<div> text and picture alignment <span style= "Vertical-align:text-bottom" ></span> </div>

<br>

<div> text and picture alignment <span style= "Vertical-align:text-top" ></span></ Div>

<br>

<div> text and picture alignment <span style= "Vertical-align:top" ></span></div >

</div>

Method Two: Usually the picture and the text together when the picture tends to be biased, by setting the Margin-bottom can achieve the text picture bottom alignment goal

When we do the Web page, we will encounter a picture and text position on the problem of misalignment. (generally shown in the picture is always higher than the text)

The best way to solve the problem:. A key attribute: Margin-bottom The text can be moved up by modifying the bottom height of the outer border of the picture. This is done by setting this value to a negative number. For example, we put the following picture of 16x15 to set its

or set it inside the style.

IMG {

margin-bottom:-3px;

}

So the text and picture are centered. This value changes with the size of the picture, the specific test you know.

Method Three:

Ji=

margin:0px;

padding:20px 3px 3px 8px;

Background:url (images/sohu_06.jpg) no-repeat 0 50%;

List-style-type:none;

List-style-position:inside;

}

<a href= "file name" ></a>

<a href= "" target-></a>

Target-blank (opens a new page)

Target-self (replace current page)

SRC is a link to an external website

Framework

The framework divides a large browser window into areas where each area can display a separate Web page, each of which can be viewed as a small browser window

The pane is equivalent to the frame structure in the frame <frameset>, using <frameset> can divide the window browser

Frame looking for you can't appear body

Frameboder: Whether to display frame edges, value:Yes or no. 1 or 0

Border: Sets the thickness of the frame edge,

BorderColor: Border color

Framespacing: The distance between frames

Rows: Dividing upper and lower or upper-middle frames

rows="x,*" divides the upper and lower two frames, the upper frame 80px; the remaining is the height of the frame

rows=",*,Four" divided into the next three frames, on the Is the rest of the frame.

Cols: Dividing the left and right three frames

Cols:="x,*" divides the left and righttwo frames, 80 The rest is the right frame .

Cols: "four,*," divided three left and right free Scaling in

<frame> is a small window

SRC: Specify a Default Web page

Scrolling: How the scroll bar is displayed:auto is displayed automatically,Yes shows no display

Noresize: Whether the frame can be resized,

Name: Specifies the names of the small windows,

<frameset cols= "Separated by the percentage of columns" rows= "separated by the percentage of rows" >

<frame Property: /> such as <frame src= "" Noresize is not drag >

<frameset>

such as aa.html and bb.html. They make up the all.html. Do not hold in body in all

Frameborder is a border

Framespacing refers to the distance between the Borders BorderColor is the color of the border

Inline frame iframe:

Note that it is a inline frame and is a child tag of the body, which can be understood as digging a hole in a Web page,<iframe property ="Property value" > I'm sorry you're screwed </iframe>

SRC: Specifying the introduced Web page file

Frameborder: whether to show frame borders

Width: The thickness of the border

Height: high of frame

Align: How the frame is aligned in the body or Web page,

Srcolling: How to display scroll bars

< Name= "" >

<option value= "Beijing" ></option>

</selcet>

<select size= "2" > refers to two lines, and two is selected

<select size= Multiple> is a multi-select

Hidden refers to the hidden

<input type= "hidden" value= "re-enter" >

<textarea cols=30 rows= "" ><textarea> Is this text field

* (Password Password box text is text box hidden hidden box checkbox checkbox Radio is a radio box sumbit submit button Reset reset button image is picture)

Appears in the list

To give span a right float

Properties of Marquee: Block element

Width: Wide

Height: High

Direaction: direction:left right up down;

Behavior: Scrolling Way, Value:alternate(bounce)slide(scrolling)

ScrollAmount: The step value to roll to; the higher the value, the faster the scroll

Scrodelay: Dwell time between two steps in milliseconds, milliseconds =1 seconds

<marquee direction=#><font> I'll run </font></marquee>#=right left

<marquee Bihavior=#></marquee>#=scroll a circle of walk slide walk a circle stop alternate back and forth walk

<marquee scrollmount=#> #是指时间

HTML notes only apply to personal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.