An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html>:
Back
when you specify a negative pixel quantity what is the result?
Front
it subtracts the number of pixels from its normal location
Back
how does the document and other elements behave when using fixed positioning?
Front
like the element does not exist.
Back
how should the total width of an element always be calculated?
Front
Total element width = width + left padding + right padding + left border + right border + left margin + right margin
Back
if you want To know the full size of the element
Front
what must you do? ,you must also add the padding, border and margin.
Back
what is the purpose of grouping selectors?
Front
In style sheets there are often elements with the same style. To minimize the code, you can group selectors. but remember to Separate each selector with a comma.
Back
how should the total height of an element always be calculated?
Front
Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin
Back
what happens when elements are positioned outside the normal flow?
Front
, they can overlap other elements and are treated like they are not there
Back
what does the css box model allow you to do?
Front
The box model allows us to place a border around elements and space elements in relation to other elements
Back
what is the id selector used for?
Front
to specify a style for a single, unique element.
Back
how can you know what is a class selector?
Front
it will have a dot in front of it. .center {text-align:center;}
Back
describe the function of the margin part of the box model
Front
it Clears an area around the border. The margin does not have a background color, and it is completely transparent
Back
can Fixed positioned elements can overlap other elements?
Front
yes
Back
Can the content of a relatively positioned elements can be moved and overlap other elements?
Front
Yes, but the reserved space for the element is still preserved in the normal flow.
Back
what does the the z-index property specify?
Front
the stack order of an element (which element should be placed in front of, or behind, the others).
Back
what does this mean: p.center {text-align:center;}
Front
ll p elements with class="center" will be center-aligned
Back
what is the default positioning fro html elements?
Front
static
Back
how are declaration groups denoted?
Front
with curly braces
Back
how is an element with fixed positioning positioned?
Front
relative to the browser window.
Back
describe the function of the content part of the box model
Front
this is where text and images appear
Back
what does each declaration consist of?
Front
a property and a value
Back
is it possible to apply a style for a selector within a selector?
Front
yes.one style is specified for all p elements, and a separate style is specified for p elements nested within the "marked" class
Back
what is the advantage of image sprites
Front
A web page with many images can take a long time to load and generates multiple server requests. Using image sprites will reduce the number of server requests and save bandwidth.With CSS, we can show just the part of the image we need.
Back
why cant you start an id selector with a number
Front
it wont work in firefox
Back
what are the two main parts of a css rule?
Front
a selector, and one or more declarations
Back
what do the css positioning properties allow you to do?
Front
they allow you to position an element. It can also place an element behind another, and specify what should happen when an element's content is too big.
Back
can elements be positioned using the top
Front
bottom, left, and right properties?,yes,but the css position property has to be set first and also work differently depending on the positioning method.
Back
what are the four cvss positioning methods?
Front
static,fixed,relative and absoulute
Back
what are the three ways of inserting a style sheet?
describe the function of the padding part of the box model
Front
an area around the content. The padding is affected by the background color of the box
Back
How do Css declarations always end?
Front
with a semicolon
Back
how can you tell what an id selector is
Front
it will have a # in front of the id. this style will be applied to the element with id "para1"
Back
will an element with fixed positioning move when the window is scrolled?
Front
no
Back
When you specify the width and height properties of an element with CSS
Front
what are you setting the width an height of? ,you are just setting the width and height of the content area
Back
what is a selector?
Front
the HTML element you want to style
Back
what is a property?
Front
the style attribute you want to change.Each property has a value.
Back
what is relative positioning?
Front
A relative positioned element is positioned relative to its normal position
Back
what is the css box model
Front
is essentially boxes within boxes that wraps around HTML elements, and it consists of from outer box to inner box: margins, borders, padding, and the actual content.
Back
why do you need to know how the box model works?
Front
In order to set the width and height of an element correctly in all browsers, you need to know how the box model works.
Back
what is an image sprite?
Front
n image sprite is a collection of images put into a single image
Back
why is it important to know the full width an height of an element?
Front
because if you only have 300 pixels of space and the margin padding, border and content add up to more than 300 pixels then you will need to reduce the total to fit.
Back
what does the class selector allow you to do?
Front
to set a particular style for any HTML elements with the same class
Back
what is the class selector
Front
The class selector is used to specify a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.
Back
describe the function of the border part of the box model
Front
it lies around the padding and content. The border is affected by the background color of the box
Back
can an element can have a positive or negative stack order?
Front
Both
Back
how are relatively positioned elements are often used?
Front
as container blocks for absolutely positioned elements
Back
An element with greater stack order is always in front of an element with a what?
Front
lower stack order.
Back
What is the CSS syntax
Front
...
Back
how is a static element positioned?
Front
according to the normal flow of the page.
Back
are Static positioned elements affected by the top
Front
bottom, left, and right properties?,no
Back
Section 2
(17 cards)
what will the elements before a floated element do?
Front
The elements before the floating element will not be affected.
Back
what are some examples of block elements:
Front
<h1>
Back
can Pseudo-classes and CSS Classes be used together?
Front
yes
Back
how far to the left or right will a floated element move?
Front
as far as it can
Back
how do you center Align an element uUsing the margin Property?
Front
by setting the left and right margin to auto
Back
what are css pseudo classes used for?
Front
to add special effects to some selectors
Back
is it possible to style HTML elements that have specific attributes without specifying a class and id? If so how?
Front
yes. examplee below styles all elements with a title attribute:
Back
what are attribute selectors are particularly useful for?
Front
styling forms without class or ID:
Back
what happens if you place several floating elements after each other?
Front
they will float next to each other if there is room.
Back
What is CSS Float?
Front
With CSS float, an element can be pushed to the left or right, allowing other elements to wrap around it.
Back
what is a block element?
Front
A block element is an element that takes up the full width available, and has a line break before and after it.
Back
what is css float used for?
Front
Float is very often used for images, but it is also useful when working with layouts
Back
what is the The syntax of pseudo-classes:
Front
selector:pseudo-class {property:value;}
Back
what does the clear property specify?
Front
The clear property specifies which sides of an element other floating elements are not allowed.
Back
what will the elements after the floated element do?
Front
The elements after the floating element will flow around it.
Back
How are Elements Floated?
Front
Elements are floated horizontally, this means that an element can only be floated left or right, not up or down.
Back
what if you dont want elements to flow around a floated element?