
Hello Yclas friends! This week we are sharing some tips to make your website look better with CSS.
The appearance of your website determines whether users and customers stay or leave in search of a better-looking site.
First, you have to enable custom CSS in your website panel: see how to enable and add custom CSS on Yclas.
Let's start!
In short
- Turn on custom CSS under Design, Custom code with the 'Use custom CSS' switch, and paste only CSS, never style, head or HTML tags.
- Class names differ between themes, so target the classes your theme really uses (find them with Inspect) instead of generic selectors like ul or #grad.
- On the Nova theme, change the main color with the accent color setting, and override CSS variables such as --nova-radius for other tweaks.
- Modern features like color-mix(), :has(), CSS nesting, container queries and flexbox now work in all major browsers and replace older workarounds like floated menus.
- Use sans-serif fonts, rounded borders and max-width: 100% for responsive images, and check every change on a phone as well as a computer. If you would rather not write CSS, the Yclas AI page builder can change the look for you.
Part of the guide Starting a marketplace
Background
Nowadays, the best websites use gradient backgrounds, a simple and smooth change from one color to another. If you use the right ones, your site will look modern. Here are 3 different modern backgrounds:
Gradient #1 (Pacific Colors)
#grad
{background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

Gradient #2 (Strong Colors)
#grad
{background-image: linear-gradient(to top, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%);
}

Gradient #3 (Smooth Colors)
#grad
{background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
}

Fonts
The font of your website plays a fundamental role. We recommend sans-serif fonts, like:
Arial
p.sansserif {
font-family: Arial, Helvetica, sans-serif;
}
Tahoma
p.sansserif {
font-family: Tahoma, Geneva, sans-serif;
}
Trebuchet MS
p.sansserif {
font-family: "Trebuchet MS", Helvetica, sans-serif;
}
These fonts are easy on the eyes.
Element Borders
Another tip is to use rounded edges for elements, as this makes your website look simple and modern. To achieve that, use this code:
p.round {
border: 2px solid black;
border-radius: 8px;
}

You can adjust the color (solid black) and radius (8px) of the border.
Navigation Bar
The navigation bar is one of the most important things on a website. A well-done navigation bar will help users navigate your site. Here is a Sticky-Active/Current Navigation Bar; it will make your navigation bar move and stick on top depending on the scroll position:
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #4682B4;
position: sticky;
top: 0;
}
li {
float: left;
}
li a {
display: block;
color: White;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #111;
}
.active {
background-color: #4169E1;
}
</style>
</head>
<body>
<ul>
<li><a class="active" href="#home">Home</a></li>
<li><a href="#search">Search</a></li>
<li><a href="#YCLAS">YCLAS</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>You can change the colors (Background, Text, and Active/Current Link), and resize (Padding) the navigation bar.

Responsive Images
Images are essential on every website, and we are used to seeing them everywhere. But it is not enough to put an image on your website: you have to make it responsive so it looks good on any device. To achieve that, use this code for all the images you want to be responsive:
img {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<img src="X" width="IMG width" height="IMG height">
The X represents the image URL; in IMG Width and IMG Height, write the original size of the image.

Website Layout
The layout is the arrangement of the main elements on your website, such as the header. The header is the first element users see when they enter the website, so it has to be simple and easy to understand. Here is CSS for an image header with text:
body {
margin: 0;
}
.header {
background:url(X) no-repeat;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="header">
<h1>HEADER TEXT</h1>
</div>
The X represents the image URL, Padding sets the size of the image header, and Header Text is where you can write what you want to show above the header image.
Another main element of your website is the footer, at the bottom of the page, which is as important as the header. You can use this code for a good-looking footer:
.footer {
background-color: #00FFFF;
padding: 25px;
text-align: center;
}
You can change the color and size (padding) of the footer.
Modern CSS in 2026: What Has Changed Since These Tips
The snippets above still show the basic ideas, but CSS has moved on a lot since this post was written. Browsers now share a common baseline of features, and the theme your site runs on decides which selectors your CSS can target. Here is what to know before you paste anything into your custom CSS.
Check Browser Support with Baseline
Baseline, defined by the W3C WebDX Community Group, labels a feature "newly available" once it works in all the core browsers (Chrome, Edge, Firefox and Safari, on desktop and mobile). It becomes "widely available" 30 months later, when most sites can use it without worrying about older browsers. MDN shows the Baseline status at the top of every reference page. These are the features that replace most of the workarounds above:
| Instead of... | Use today | Baseline status (MDN) |
|---|---|---|
| Repeating hex colors in every rule | CSS custom properties (variables), e.g. var(--nova-accent) | Long established |
| Hand-picking hover shades | color-mix(), e.g. the accent mixed with 18% black | Widely available (in all major browsers since May 2023) |
| Extra classes or JavaScript to style a parent | :has(), e.g. form:has(:invalid) button { opacity: .6; } | Widely available (in all major browsers since December 2023) |
| Long, repeated selectors | CSS nesting with & | Widely available (in all major browsers since December 2023) |
| Media queries tied to the screen width | Container queries (@container), so a card adapts to the column it sits in | Widely available (in all major browsers since February 2023) |
Floated menu items (li { float: left; }) | Flexbox: display: flex; gap: 8px; | Long established |
Start from Your Theme, Not from a Blank Page
The current Yclas guide turns custom CSS on under Design > Custom code, with the "Use custom CSS" switch. It also warns that class names differ between themes, so a rule written for one theme may do nothing after you switch. Generic selectors like #grad or ul either do nothing or restyle every list on your site, so always target the classes your theme really uses (right-click an element and choose Inspect in your browser to find them).
New Yclas sites run the Nova theme, which is built on CSS variables. To change the main color, use the accent color setting in the theme options instead of CSS: buttons, links and highlights all follow it, and the hover shade is calculated for you. For other adjustments, overriding a variable is safer than rewriting rules, because one line changes every element that uses it:
:root {
--nova-radius: 10px; /* rounder or squarer cards and buttons */
--nova-radius-sm: 6px;
}
Two more rules keep you out of trouble. The custom CSS box only takes CSS, so leave out the <style>, <head> and HTML tags shown in some snippets above. And check every change on a phone as well as a computer before you save.
Try these tips and let us know if they work for you!
Note: Using CSS requires some skill and experience. If you have never used CSS, we recommend some CSS Tutorials and CSS Guides to achieve what you are looking for. If you don't want to use CSS, you can use our themes. We offer a variety of custom website templates: browse them in our template gallery.
Regards,
Yclas team.


