Media query is a CSS technique introduced in CSS3.
It uses the @media rule to include a block of CSS properties only if a certain condition is true.
Example
If the browser window is 600px or smaller, the background color will be lightblue:
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
In the CSS, a class selector is a name preceded by a full stop ('.') and an ID selector is a name preceded by a hash character ('#'). The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one.
Just use width="100%" instead of 800px ; This will work for all kinds of resolutions.
usage of meta-refresh tag
<meta http-equiv="refresh" content="15;url=index.jsp"/>
After 15 seconds it will redirect to index page.If you want to display some server maintenance notice you can display initially and then redirect to homepage after 15 secs
There are three types of stylesheets:
Internal - Placed right on the page whose interface it will affect.
External - Placed in a separate file.
Inline - Placed inside a tag it will affect.
Properties of CSS: Inline CSS has the highest priority, then comes Internal/Embedded followed by External CSS which has the least priority.
local style sheets have the highest priority than global.
also, the last defined style have the highest priority in side a file.
just use meta-refresh tag
<meta http-equiv="refresh" content="15;url=index.jsp"/>
After 15 seconds it will redirect to index page.
you can create id with # (hash) or a class with . (dot). or directly we can use style attribute in our tags, or create a local style tags or global style tags in a file called Style.CSS
If the rowspan property is given a value of 2, it will stretch across two cells horizontally. In short, colspan is used to merge 2 or more cells horizontally. And rowspan is used to merge 2 or more cells vertically.
Cellspacing is the space between cells. Cellpadding is the space between the content inside the cell and its borders. Cell Spacing is used to set space between different table cells. CellPadding is used the space between the edges of the cell and the content of the cell.
div - it is a dom element with display property as a block that is element will take the whole row that is with the line-break.
<div>Your name?</div>
<div>xyz</div>
will be displayed in two different rows. and each div will be considered as an individual block.
Your name?
xyz
span - dom element with display property inline that is without line-break.
<span>Your name?</span>
<span>xyz</span>
the result will be on the same line because of the span
Your name?xyz.
Other usage of span is you can apply different style in side a div element.
Ads By Google
© 2018 - JavaSpartans.com • All Rights Reserved