Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css set width of a span

span {    /* Normally a span has no width! */
  display: inline-block; /* This fixes it. */
  width: 50px; /* Whatever width you like. */
}
/* Does not work in FF2 and below. */
Comment

can span have width

/* An html span element does not have width or height,
because it is an inline element */
span{
  width: 10px; /* Does not work. Apparent width is still 0. */
}
Comment

PREVIOUS NEXT
Code Example
Css :: css profile picture round 
Css :: mysqli load result into array 
Css :: css float top 
Css :: inset boxshadow 
Css :: css background image cut off 
Css :: how to make a relative div not take up space 
Css :: how to align border to center in css 
Css :: css selector label for 
Css :: css transition ease 
Css :: how to put link at bottom of page html 
Css :: scss extend 
Css :: html css background linear-gradient 
Css :: type selector css 
Css :: grid css 
Css :: input type file placeholder 
Css :: text stroke css 
Css :: disable checkbox click event 
Css :: website css not loading 
Css :: rotate animation css 
Css :: css cut lines 
Css :: background-attachment 
Css :: css disabled tag hover style 
Css :: overflow-x hidden not working 
Css :: centering using flexbox 
Css :: align absolute div center 
Css :: block elements css 
Css :: css clippath 
Css :: display elements in column css 
Css :: constraint barrier example 
Css :: grid template 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =