Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
Markdown Monster - The Markdown Editor for Windows

WebLog Posts in Category CSS


Categories
ASP.NET (325) .NET (181) Windows (77) JavaScript (72) jQuery (61) Visual Studio (54) IIS (48) Csharp (47) WPF (47) HTML (46) AJAX (45) ASP.NET (33) Localization (32) LINQ (30) WCF (28) MVC (26) Personal (25) Security (23) HTML5 (23) FoxPro (22) CSS (21) C# (20) Angular (20) Web Services (19) Web Api (16) COM (16) ADO.NET (15) Vista (11) XML (11) WebView (10) Sql Server (10) HTTP (10) IIS7 (10) Markdown (9) Microsoft AJAX (8) IIS7 (7) Web Connection (7) West Wind Ajax Toolkit (7) NuGet (6) Markdown Monster (6) Entity Framework (6) Html Help Builder (5) Live Writer (5) Internet Explorer (5) C++ (5) ASPNET5 (5) Mobile (5) SignalR (5) Software Development (5) Web (5) OWIN (5) WinForms (5) Westwind.Globalization (4) Source Control (4) Silverlight (4) Cordova (4) Conferences (3) DataBinding (3) ASP.NET Core (3) Help Builder (3) ISV (3) LetsEncrypt (3) Networking (3) Office (3) Opinion (3) Razor (3) Web Browser Control (3) WebLog (3) Web Development (2) Visual Studio Code (2) Tools (2) Speaking (2) RegEx (2) RSS (2) Linux (2) Installation (2) Bugs (2) Help (2) Dotnet (2) .NET Standard (2) Addins (2) Deployment (2) Authentication (2) ASP.NET vNext (2) ADO.NET (1) Chocolatey (1) Blazor (1) Blogging (1) Desktop (1) Control Development (1) Credit Card Processing (1) Cross-Platform (1) .NET ASP.NET Windows (1) Security (1) Visual Studio (1) ASP.NET IIS (1) ASP.NET Markdown (1) AI (1) Angular JavaScript (1) Dynamic Types (1) Email (1) CSharp Dotnet (1) Git (1) Graphics (1) Hardware (1) FireFox (1) Flexbox (1) IOS (1) JSON (1) Migration (1) rxJs (1) SEO (1) RazorPages (1) Musings (1) Travel (1) Typescript (1) Testing (1) Threading (1) VS Code (1) Web Deployment Projects (1) Web Design (1) Web Assembly (1) WebSockets (1) WebSurge (1) WebBrowser (1) WebDeploy (1) WFH (1) Windows-Terminal (1) Windsurfing (1) WPF Windows (1) WSL (1) wwHoverPanel (1)

UpperCase Styling via CSS and text-transform



I learned something new today: there's a CSS `text-transform` style property that can be used to transform text automatically to upper, lower or capitalized case. No JavaScript contortions and it just works. In all my years doing Web dev I've not run into this property before, so I'm posting it here for others to find as well...

Use CSS.escape() to escape QuerySelectorAll()



Ran into an issue recently where a querySelector operation was failing in document link navigation when navigating hashes. There are a few issues at work when using Hash navigation but one issue i didn't expect to run into was a naming conflict of a hash tag that interfered with CSS operators. Turns out there's an easy solution around with with CSS.escape - if you can make the connection. In this post I talk about the problem how it might show up and how to fix it.

Using the brightness() CSS Filter to generically highlight Content



Filters are not new in CSS, but their often overlooked for providing some useful generic behaviors for things like hover styling or nice background effects. In this post I discuss how to use the brightness() filter to create a generic button hover behavior and also briefly discuss the newish `backdrop-filter` property.

Bootstrap Modal Dialog showing under Modal Background



On more than a few occasions I've run into issues with Bootstrap's Modal dialog rendering incorrectly with the dialog showing underneath the overlay. There are a number of ways around this problem, but none of them are universal that depend on how your pages are laid out. It's especially problematic for applications that dynamically render components where there's no good control on where the elements are placed outside of the components DOM containership. In this post, I describe a few of the workarounds and their limitations.

Code Magazine Article: Flexing your HTML Layout Muscles with Flexbox



Flexbox is a relatively new CSS based technology that makes it much easier to create structured layouts with HTML and CSS. Based on a containership hierarchy, Flexbox combines the structured features of tables with the free form layout capabilities of arbitrary HTML elements that make it possible to create complex , yet flexible HTML designs much more easily that was otherwise possible. My article in CoDe Magazine describes the reasons for Flexbox, the basics of operation and few practical examples you can use today to put flexbox to use.

Flexbox Containers, PRE tags and managing Overflow



I ran into nasty problem with PRE tag overflow behavior, which caused content of PRE tags to not respect the boundaries of the container even when overflow rules were set. It turns out the problem was due to Flexbox and the min-width setting that is set differently than standard DOM Block mode rendering.

FontAwesome Fonts and Mime Types in IIS and other Web Servers



When using Font-Awesome on IIS (and other Web Servers) you might find that the server is not serving the .WOFF2 or .WOFF file that is requested by Chrome for the FontAwesome font files. Although Fontawesome works fine regardless, you'll want to address the 404 error by serving the preferred file. Here's how.

Styling all Text Elements with the CSS :not Filter



HTML5 has a proliferation of INPUT types and when you need to style these types in an application the list can get quite long. You can cut down on the size of the list and simplify remembering which INPUT types you don't want styled as text, by using the CSS :not() selector. This post shows how.

IPad Scroll Issues with Fixed Content



Ran into some issues with fixed headers again in one of my mobile applications where on an iPad it appeared the content wouldn't scroll properly. I've run into this issue a few times and it turns out it's related to positional layout and specifically problematic on iPad Safari browsers. In this post I'll discuss the problem and the relatively simple workarounds.

Using FontAwesome Fonts for HTML Radio Buttons and Checkboxes



Spruce up your boring checkboxes and radio buttons with custom FontAwesome symbols using a little bit of CSS. If you're tired of boring checkboxes and radio buttons, or you simply want a more consistent look of these controls across browsers and controls check out FontAwesome to provide you with customizable checks and boxes to use for selection boxes. In this post I'll show how to use pure CSS to set up FontAwesome checkboxes and radios and talk about a few gotchas I ran into along the way.

AngularJs ng-cloak Problems on large Pages



Angular supports the ng-cloak directive to address hiding initially unrendered template content. I found out the hard way that sometimes with very large pages this mechanism doesn't quite work and still results in slight page flicker of the unrendered template content. In this post I describe the problem and several easy solutions to get around it the edge case scenario.

Using CSS Transitions to SlideUp and SlideDown



CSS Transitions are a nice way to replace jQuery animations with smoother counterparts. Some transitions however, like height and width transitions can be tricky to handle with pure CSS code due to container sizing issues. In this post I show how create create transitions to mimic most of jQuery's slideUp() and slideDown() functions using CSS and small jQuery plug-in.

Rounded Corners and Shadows – Dialogs with CSS



CSS 3 provides for box-radius and box-shadow, two features that make it really easy to create attractive floating windows easily with native CSS. Here's what you need to know to create rounded corners and box shadows effectively.

Rounded Corner Rendering in newer Browsers



Rounded corners in HTML have been an elusive target. It's been done a million times over, but most of the approaches from manually creating images to using automated JavaScript to using complex CSS layouts with dependent images are a pain to work with. CSS 3.0 offers some relief by providing native support for rounded corners, but you can take advantage of this functionality today in some browsers that already support this functionality via browser specfic extensions.

An annoying IE position: Relative and OverFlow-Y Bug



Ran into a real sneaky but that only shows up in pre-IE 8 standards mode versiosn of Internet Explorer. Any parent elements that contain child elements that have position: relative set cannot be contained in the parent container via overflow settings or even a fixed height, resulting in elements spilling out of the bottom of the container. It appears there's no direct workaround short of using a different approach to element positioning.

Unwanted Padding in IE Image Rendering in div Tag



I've repeatedly run into an issue where putting an image inside of a div tag as its only content causes IE to render a bit of padding that shouldn't be there. No problem in other browsers, but definitely an issue in IE.

:hover behavior in IE 7



Ran into an odd problem today with :hover CSS styling that wouldn't work in IE 7. It turns out that I accidentally wiped out my doctype, but even after restoring the doc type I still ended up with problems in large lists.

Absolute Positioning inside of a Relative Element with CSS



Getting elements positioned absolutely inside of a container is not terribly obvious and not very discoverable using CSS. But it can make for a cool effect and is a useful feature for many overlay type operations in Html markup. Here's an example of a hover over delete button that pops up on focus of an element.

Creating a scrollable and grouped Repeater Layout



A couple of people asked me today about a layout I put together for an application. The layout is bascially a scrollable and grouped repeater that looks a little like a ListView control in WinForms. This sort of layout can be great for longer lists when paging is not really the right choice - a common scenario in AJAX applications actually. Here's a quick walk through on how this layout is put together.

Images as Style Attributes



Here's a little tip that I started using more frequently recently that involves images. When embedding images into pages you're often inclined to use an IMG tag or an ASP.NET image control. In some situations though - especially if the same image repeats on the page - it can be much more efficient...

Some great practical CSS Links



Ran into a cool collage of CSS formatting related links that show a number of cool practical examples for CSS.
West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024