Why hyphen (-) separated class names are widely used in CSS [closed]

Readability: ui-helper-reset readable, uiHelperReset unreadable. Safe delimiter: When using attribute selectors like [class^=”icon-“], [class*=” icon-“] to specifically and safely target the specific classname styles by prefix, while preventing i.e: .iconography to be matched. Ease of use: In every decent code editor, if you use – to separate combined-class-name you can easily highlight a desired portion … Read more

CSS a:link keep original color

Try this in your stylesheet: a:link { color:inherit; } Note that you then probably should make sure you have some other way to identify links, or your users will be confused. (I.e. don’t remove the underlining, too.) If you want to deal with browsers not supporting inherit, I suppose repeating the definition which originally set … Read more

wrap anchor tag around li element

The only legal element allowed inside a <ul> is an <li>. You cannot have an anchor wrapped around the <li>. This holds true in HTML5, where an anchor can wrap around other block level elements. What you have in CSS is nearly there, just add: a { text-decoration: none; display: block; width: 100%; height: 100%; … Read more

How to make width and height of iframe same as its parent div?

you have a lot of typos. a correct markup should be like: <iframe src=”https://stackoverflow.com/questions/18765762/./myPage.aspx” id=”myIframe” scrolling=”no” frameborder=”0″ style=”position: relative; height: 100%; width: 100%;”> … </iframe> also, if this frame already has an ID, why don’t you put this in CSS like this (from a separate stylesheet file): #myIframe { position: relative; height: 100%; width: 100%; … Read more

Centering grid items in an auto-fill container

Flexbox The most efficient solution to your problem is probably flexbox, as flex items are not confined to individual tracks (columns/rows) like grid items. .grid { display: flex; flex-wrap: wrap; margin-bottom: 1em; } .item { flex: 1 0 100px; background: #eee; text-align: center; border: 1px dashed gray; box-sizing: border-box; } <div class=”grid”> <div class=”item”>Item 1</div> … Read more