I dont get it, it seems so simple. I want to add a span style to the "Hello" text with a .class
http://www.mysecretathens.gr/kulte_test/index.html
Why doesnt this .greeting class work? It only becames 60pixels when I put it like that
<span style="font-size:60px;">
Any ideas?
The span tag is a paired tag means it has both open(<) and closing (>) tags, and it is mandatory to close the tag. The span tag is used for the grouping of inline elements & this tag does not make any visual change by itself.
The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute.
How to style text with the span tag. If you want to makes some particular text or any other content different from the rest, you can wrap it in a span tag, give it a class attribute, then select it with the attribute value for styling.
The <span> HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang .
You havent closed a CSS class above it. Put a curly brace righ before:
::selection{
like so:
#container2 {
background-color: #ebebeb;
height: 400px;
background-image: url("white_arrow.png");
background-repeat: no-repeat;
background-position: 50% -28px;
margin: 0 auto;
padding-top: 80px;
text-align: center;
color: #636161;
font-family:'Open Sans', sans-serif;
font-size: 20px;
line-height: 30px;
}
::selection {
color: #fff;
color: rgba(255, 255, 255, .85);
text-shadow: none;
background: #da0225;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With