How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags [duplicate]

The most common way to do this is something along these lines: ul { list-style: none; padding: 0; margin: 0; } li { padding-left: 1em; text-indent: -.7em; } li::before { content: “• “; color: red; /* or whatever color you prefer */ } <ul> <li>Foo</li> <li>Bar</li> <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed … Read more

Center a position:fixed element

You basically need to set top and left to 50% to center the left-top corner of the div. You also need to set the margin-top and margin-left to the negative half of the div’s height and width to shift the center towards the middle of the div. Thus, provided a <!DOCTYPE html> (standards mode), this … Read more

Setting width/height as percentage minus pixels

You can use calc: height: calc(100% – 18px); Note that some old browsers don’t support the CSS3 calc() function, so implementing the vendor-specific versions of the function may be required: /* Firefox */ height: -moz-calc(100% – 18px); /* WebKit */ height: -webkit-calc(100% – 18px); /* Opera */ height: -o-calc(100% – 18px); /* Standard */ height: … Read more

CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page

Below are 4 different methods of mine: In each example the texts are freely-editable to illustrate how the content would render in different scenarios. 1) Flexbox body{ height:100vh; margin:0; } header{ min-height:50px; background:lightcyan; } footer{ min-height:50px; background:PapayaWhip; } /* Trick */ body{ display:flex; flex-direction:column; } footer{ margin-top:auto; } <body> <header contentEditable>Header</header> <article contentEditable>Content</article> <footer contentEditable>Footer</footer> … Read more

CSS Font Border?

There’s an experimental CSS property called text-stroke, supported on some browsers behind a -webkit prefix. h1 { -webkit-text-stroke: 2px black; /* width and color */ font-family: sans; color: yellow; } <h1>Hello World</h1> Another possible trick would be to use four shadows, one pixel each on all directions, using property text-shadow: h1 { /* 1 pixel … Read more

CSS media queries: max-width OR max-height

Use a comma to specify two (or more) different rules: @media screen and (max-width: 995px), screen and (max-height: 700px) { … } From https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries Commas are used to combine multiple media queries into a single rule. Each query in a comma-separated list is treated separately from the others. Thus, if any of the queries in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)