![]() Using an image for all H1 tags of the site is possible if the image is wide enough to suit titles whose length varies depending on the page (this is not the case in this example). Text-shadow: -1px -1px #0c0, 1px 1px #060, -3px 0 4px #000 įont-family:Arial, Helvetica, sans-serif īackground-image:url(images/background-h1-wood.jpg) The title of the current page is done with display: block while the following demonstrations use inline, except the 3D effect which requires that we precisely control the width and height of the backround. This mode also allow to center the title in the page. With the display: block property, the width of the container depends on the size of the page, it is therefore better suited with a texture than an image, because the pattern is repeated to fill the background when you enlarge the page. In inline we can not set the dimensions with the width and height properties, but we can determine the height with padding, while line-height gives a margin to the surrounding text. Therefore the size of the background image will depend on the font size and the length of the text. ![]() The display:inline property aligns the container size, namely the H1 tag, to the content. ![]() With a single CSS rule and without added tag, so all pages of the sites can be modified at once.Īll demonstrations of this page use a single CSS rule and an image for the background.
0 Comments
Leave a Reply. |