Layout with columns? |
Layout with columns? |
sajox |
Jul 4 2020, 12:25 AM
Post
#1
|
Group: Members Posts: 9 Joined: 16-June 20 Member No.: 27,402 |
Hello everyone. I have a question in the area of CSS. When I create page layouts using columns I have a problem. It never shows up nicely in browsers. There is always some margin that is not even written in the code and various other problems. Even when I copy code from the internet. What is your suggestion? Should I use Bootstrap or something else?
|
pandy |
Jul 4 2020, 02:08 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Hello everyone. I have a question in the area of CSS. When I create page layouts using columns I have a problem. It never shows up nicely in browsers. There is always some margin that is not even written in the code and various other problems. Even when I copy code from the internet. What is your suggestion? Where do you see the margins? If they are around the page it's the default padding browsers add to BODY. Some earlier browsers used margin. I'm not sure if it's still necessary to take that into account, but I use the below line out of habit. CODE body { margin: 0; padding: 0 } If that's not the problem, please explain further or show us an example. QUOTE Should I use Bootstrap or something else? No. Don't add more to the mix until you can handle the mix you already have. But that's my opinion. |
Christian J |
Jul 4 2020, 06:18 AM
Post
#3
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
Many HTML elements have default margins as well: https://www.w3schools.com/cssref/css_default_values.asp
Note that default styles may not be exactly the same between browsers: https://bitsofco.de/a-look-at-css-resets-in-2018/ |
Lo-Fi Version | Time is now: 19th April 2024 - 10:10 PM |