How to fix DIV in W3.CSS?

About programming and getting involved with Linux Mint development
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Post Reply
saseda77
Level 1
Level 1
Posts: 12
Joined: Fri Aug 19, 2022 9:46 am
Contact:

How to fix DIV in W3.CSS?

Post by saseda77 »

In the normal CSS is very easy for me : i make in CSS

Code: Select all

div.fixed {
  position: fixed;
  bottom: 150px;
  right: 150px;
  width: 300px;
  border: 3px solid #73AD21;
}
and in HTML

Code: Select all

<div class="fixed"></div>
, but in W3.CSS i don't know how to do that... :roll: I want to be responsive and mobile for all devices.
I can't start Viber on Mint 21
billyswong
Level 8
Level 8
Posts: 2240
Joined: Wed Aug 14, 2019 1:02 am

Re: How to fix DIV in W3.CSS?

Post by billyswong »

From what I found W3.CSS seems just a plain stylesheet with a bunch of pre-made styles and classes?

So the key here is, what exactly you want this fixed div adapt to in mobile. According to https://www.w3schools.com/w3css/w3css_responsive.asp, they provides classes for elements to take different size in screen of different size. You can use max-width in your own class to better mesh with classes from W3. By the way, for such a specific sized and positioned div, "fixed" as the class name is a bit too general to my taste.
saseda77
Level 1
Level 1
Posts: 12
Joined: Fri Aug 19, 2022 9:46 am
Contact:

Re: How to fix DIV in W3.CSS?

Post by saseda77 »

I like this :

Code: Select all

div.fixed {
  position: fixed;
  bottom: 150px;
  right: 150px;
  width: 300px;
  border: 3px solid #73AD21;
}
Can i make this? I like to set bottom and right positin for fixing my DIV.

And when i put a table in the DIV must be mobile too, not to dissapered...
I can't start Viber on Mint 21
billyswong
Level 8
Level 8
Posts: 2240
Joined: Wed Aug 14, 2019 1:02 am

Re: How to fix DIV in W3.CSS?

Post by billyswong »

saseda77 wrote: Mon Nov 13, 2023 9:16 am And when i put a table in the DIV must be mobile too, not to dissapered...
You confused me. An element won't disappear magically in mobile. Can you provide more context?
Post Reply

Return to “Programming & Development”