+ 4
display: block not doing anything on span element
Okay so i have a program that has a <span> element rendered by CSS: .whatever-the-spans-class-is { font-weight: bold; display: block; } it seems like it should work. does the display need another css value set for it to work, or are there css values that disable display: block to work? thanks in advance
13 odpowiedzi
+ 8
Hello, privrax. !
Do not forget that the <span> tag is a container. So in which tag do you use the <span> ?
+ 5
What are you trying to achieve:
1. Make text go through a whole block
2. Make text invisible
+ 4
remember <Span> tag is a container for values
+ 3
Homayoun Aghaei no, because thats not the real code. The actual project I’m working on is much bigger.
+ 2
Alexander Sokolov I want text in the span. So should I have:
<span class=“someclass>
<p>blah blah blah</p>
</span>
?
+ 2
Agent Im tryint to do the former.
+ 2
The HTML <span> tag is used for grouping and applying styles to inline elements. There is a difference between the span tag and the div tag. The span tag is used with inline elements whilst the div tag is used with block-level content.
+ 1
privax
try this on html
<span>Text for test</span>
<span>Text for test 2 </span>
then:
enter this on css
span{display:block;}
block makes the text to not continue on same line
+ 1
Homayoun Aghaei yes but its not working.
0
why? it's very simple code
0
For what it is for you?
0
what is span?
0
yes, what is span?