Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Span class styling [closed]

Tags:

html

css

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?

like image 574
a.litis Avatar asked Jan 31 '13 22:01

a.litis


People also ask

Does span have a closing tag?

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.

Can you add style to span?

The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute.

How do I add a style to span class?

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.

Can you put class in span HTML?

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 .


1 Answers

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;
}
like image 128
Sajjan Sarkar Avatar answered Sep 28 '22 11:09

Sajjan Sarkar