Morten Sæther

← Blog

Styling and Basic CSS Customization

#10 · 21 March 2026

Brand, CSS structure, and overriding Power Pages without breaking it

People decide whether your organisation looks credible within a couple of seconds of the page loading. That’s not fair, but it is how it works, and it’s a good reason to take styling seriously on a portal your customers see.

Styling isn’t only decoration either. Visual hierarchy tells people what matters, consistent spacing reduces the effort of reading a page, and good contrast is the difference between usable and unusable for a chunk of your audience.

Step by step

1. Understand what you’re overriding

CSS loads in this order in Power Pages, last wins:

  1. bootstrap.min.css
  2. theme.css
  3. Your custom CSS files, in the order you set under Manage CSS
  4. portalbasictheme.css
  5. Inline styles

Your custom CSS sits between theme.css and portalbasictheme.css, not last. That is deliberate: the Styling workspace is meant to own what it covers, and custom CSS is for what it doesn’t. Don’t deactivate or reorder the three default files, and don’t swap Bootstrap for another library - parts of the site depend on it. Sites run Bootstrap 3.3.x unless created or migrated as Bootstrap 5.

Knowing that order saves you from reaching for !important every time something doesn’t take.

The classes worth knowing before you start:

/* Power Pages specific classes */
.navbar-nav                /* Main navigation */
.breadcrumb               /* Breadcrumb navigation */
.entitylist               /* List components */
.entityform               /* Form components */
.crmEntityFormView        /* Form containers */
.validation-summary-errors /* Form validation */

2. Set up your CSS

Open the Styling workspace, pick Manage CSS from the more options menu, and upload your files there. Each one becomes a web file, up to 1 MB, and the same panel lets you reorder or disable them. There are no folders: a web file is a record with a parent page and a partial URL, so keep the names distinct.

Organise them rather than dumping everything in one file:

portal-theme.css      (main theme file)
components.css        (component-specific styles)
responsive.css        (mobile and tablet styles)
brand.css             (brand colors, fonts, logos)
utilities.css         (helper classes)

The main theme file, structured:

/* portal-theme.css */

/* Custom Properties (CSS Variables) */
:root {
    /* Brand Colors */
    --brand-primary: #0066cc;
    --brand-secondary: #f8f9fa;
    --brand-accent: #1e7e34;
    
    /* Typography */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.5;
    
    /* Layout */
    --border-radius: 8px;
    --box-shadow-subtle: 0 2px 4px rgba(0,0,0,0.1);
    --transition-standard: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: #333333;
}

/* Header and Navigation */
.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: var(--transition-standard);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
}

3. Get your brand in there

Colours first, as custom properties, so you change them in one place:

/* Brand-specific color applications */
.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #004085;
}

.text-primary {
    color: var(--brand-primary) !important;
}

/* Status indicators using brand colors */
.status-active { 
    background-color: var(--brand-accent); 
    color: white; 
}

.status-pending { 
    background-color: #ffc107; 
    color: #333; 
}

4. Style the components

Forms:

/* Form improvements */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 1rem;
    transition: var(--transition-standard);
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.required::after {
    content: " *";
    color: #dc3545;
}

Lists:

/* List component improvements */
.entitylist table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-subtle);
}

.entitylist th {
    background-color: var(--brand-primary);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border: none;
}

.entitylist td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.entitylist tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

5. Handle every screen size

Mobile first, then enhance upward:

/* Base styles (mobile first) */
.container-custom {
    padding: 1rem;
}

/* Tablet styles */
@media (min-width: 768px) {
    .container-custom {
        padding: 1.5rem;
    }
    
    .card-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .container-custom {
        padding: 3rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

What this looks like in practice

The full TechStart Solutions brand implementation:

:root {
    /* TechStart brand colors */
    --techstart-blue: #0066cc;
    --techstart-light-blue: #e6f3ff;
    --techstart-dark-blue: #004080;
    
    /* Status colors */
    --status-success: #1e7e34;
    --status-warning: #ffc107;
    --status-danger: #dc3545;
}

/* Header styling */
.portal-header {
    background: linear-gradient(135deg, var(--techstart-blue) 0%, var(--techstart-dark-blue) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.portal-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--techstart-blue) 0%, #0052a3 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 1.5rem;
}

How to make a mess and fix it

Styles not applying. Specificity first, then file load order, then clear your cache before you start doubting yourself.

Responsive layout breaking on some device. Test on the device, check the viewport meta tag, look at where your media query ranges start and stop.

Fighting Power Pages defaults. More specific selectors, and understand the cascade order above. Use !important as a last resort, not a first one.

Fonts not loading. File paths, then CORS, and specify a fallback stack.

Six habits worth keeping

  1. Define the design system first - colours, type, spacing - then write CSS
  2. Use custom properties so changes happen in one place
  3. Mobile first, every time
  4. Watch performance - unused CSS is still downloaded CSS
  5. Check contrast and keyboard navigation before you ship
  6. Test across browsers, not just the one on your machine

Wrapping up

Good styling makes a functional portal feel trustworthy. Build a coherent system, keep it responsive, don’t let it slow the site down - and remember that design is supposed to make things easier to use, not just nicer to look at.

That’s the fundamentals done. You’ve covered setup, data, security, pages, lists, forms, templates and styling. Next section gets into the more interesting stuff.