The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Layout with columns?
sajox
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 4 2020, 02:08 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(sajox @ Jul 4 2020, 07:25 AM) *

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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 4 2020, 06:18 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,630
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/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th March 2024 - 06:11 AM