DO YOU NEED A CONTENT WRITER FOR YOUR BUSINESS?

Your One-Stop Solution for All Content Needs! Click here for more!
Css

7 CSS tricks for website

Share

It is very essential to remember when using CSS to website that you need to maintain some types of tricks which is very helpful.

CSS tricks:

1) Don’t fix the font size:
You do not know in what resolution people are using your website so let auto fix the font size depends on ratio.

Avoid p {font-size: 16px;}

2) Class combine:
Suppose you want one paragraph is red then another paragraph in blus. So in this case you can combine the classes.

<p class=”para red”>…</p>
<p class=”para blue”>…</p>
<p class=”para green”>…</p>

In that case you can use style like this:

<style>
.para {
border: solid 1px #0000FF;
margin: 6px;
}
.red { background-color: red; }
.blue { background-color: blue; }
.green { background-color: green; }
</style>

So you do not need to write separate class. You just use combine class for both styles.

3) Graphics paths:
For any graphics file try to use same location for all graphics so that it can be maintain easily and you do not have to specify different path.

4) Use own bullet rathan than default bullet:
You can design your custom bullets in graphics and use them easily in list items.

<ul>
<li>list 1</li>
<li>list 2</li>
<li>list 3</li>
</ul>

<style>
ul { list-style-image: url(“bull.jpg”); }
</style>

5) Use effects:
Use visual effects for more styling display. This will attracts users.

6) Color can be clashed:
Suppose you specify a text color but forgot to mention background color then somewhere it may be fault or nor proper for color combination.
For example a brown backround color with a black text will show the format out of control. You need to match perfect color combination.

7) Show border properly:
You mentioned the border but forgot the style. As the default style is none then sometimes no border shows around the element.

Use: div {border: solid 8px;}

Namaste UI (Author)

Namaste UI collaborates closely with clients to develop tailored guest posting strategies that align with their unique goals and target audiences. Their commitment to delivering high-quality, niche-specific content ensures that each guest post not only meets but exceeds the expectations of both clients and the hosting platforms. Connect with us on social media for the latest updates on guest posting trends, outreach strategies, and digital marketing tips. For any types of guest posting services, contact us on info[at]namasteui.com.

Recent Posts

Understanding Battery Coating: Key Factors to Perfection

Battery coating is the process of applying uniform layers of active materials—such as cathode and…

18 hours ago

Edge Computing vs Cloud Computing: What’s the Difference?

Let’s face it. Tech buzzwords get thrown around a lot—especially when it comes to how…

4 days ago

How Data Intelligence Shapes the Future of Digital Innovation

In today’s digital world, the boundaries between technology, finance, and innovation are rapidly disappearing. Businesses…

7 days ago

How To Power Your Backyard Parties with A Solar Power Battery?

Backyard gatherings like BBQs, family reunions, and garden parties are an exciting way to enjoy…

1 week ago

5 Best Practices for Programmatic Advertising

Marketers are always on the lookout for more effective ways to reach their target audiences.…

1 week ago

Are We All Addicted to Stimulation? The New Face of Anxiety Disorders

Does your phone control your mind more than you control your phone? Modern life exploits…

2 weeks ago