inicio mail me! sindicaci;ón

The relative fixed position in CSS webpage and absolutely fixed position

There is a such statement in CSS: (Position) , in Dreamweaver Chinese edition the interpreter is ” of “ fixed position, commonly used attribute has two: Relative(is opposite) as absolutely as Absolute() . The use that a lot of friends dictate to this is not fair still, do here a few explain meticulously.

Position:rElative; represents relative fixed position, what control up and down can make move inside the limits that was located the label of this attribute is belonged to in place, the shift here and Padding or the positional change that are Margin place generation are different. A kind of edge that Padding and Margin are elemental itself is apart from be apart from with fill is not real shift, and the element of the Relative that be by the definition is real shift, the mobile distance of this generation is this paragraph arrives from the periphery of Margin between inside of father degree label.

Position:aBsolute; represents absolutely fixed position, if defined the element of this attribute, its position began basis browser of top left corner consideration at 0 o’clock, and be float over normal element. Need a certain element to locate a certain place in browser content area can use this property when you so.

Produced a problem then: The webpage that everybody does now is be placed in the middle for the most part, if I need this element to follow the position of a certain element in the webpage, no matter the resolution of screen is how much its position be to be aimed at a certain element inside the page from beginning to end, relying on pure Absolute is no good.

Correct means of settlement is: In father degree element of the element the definition is Position:rGrandfather class can be here, also can be Position:aBsolute; , thank Old9 more put forward) the element that needs absolutely fixed position is set for Position:aBsolute;

Such again set Top, right, bottom, the value of Left is OK, of such its fixed position consult the left upside of the Padding of top left corner that the standard is father degree.

Bookmark:Digg Del.icio.us Reddit

Leave a Comment