Log In · Register

 
Coding questions., advanced or am I behind?
Genocide
post Feb 5 2009, 07:48 PM
Post #1


Senior Member
***

Group: Member
Posts: 61
Joined: Jun 2005
Member No: 149,535



A few questions about coding:

I understand what padding does, but what does it do when you have more than one pixel amount side by side?

CODE
padding: 2px 4px;


In this layout http://www.createblog.com/layouts/code.php?id=28124 what does this part of the code for the navigation links do?

CODE
-moz-box-sizing: padding-box;


or this

CODE
margin: 3px 2px;
 
 
Start new topic
Replies
HeartOfPandora
post Feb 5 2009, 08:00 PM
Post #2


i like boobies, yes I do. I like boobies - how 'bout you?
*****

Group: Member
Posts: 620
Joined: Jun 2008
Member No: 662,457



Technically, it should be something like
CODE
margin: #px #px #px #px;

OR

margin: #px;

OR

margin-top: #px;
etc


The four are the sides of the screen, always parsed in exactly this order: top right bottom left. The second one with only one number gives all the positions the same margin, so margin: 5px; would give all four sides a margin of 5px. It's the same with the padding. I suppose you could do just the two, the first being top and bottom definitions, the second number being side definitions, but that would likely cause parsing differences depending on what browser you're viewing with.

-moz-box-sizing is a bit more confusing, and it has to do with Mozilla browsers and setting default sizes on elements. I couldn't explain it, but here's an article and maybe someone else can make sense of it. This one isn't a good idea, though, because some browsers don't support it (probably Evil Incarnate) and so you'd have some serious issues when browser-checking.
 

Posts in this topic
Genocide   Coding questions.   Feb 5 2009, 07:48 PM
HeartOfPandora   Technically, it should be something like CODEmargi...   Feb 5 2009, 08:00 PM
Genocide   If I may, a few more questions without opening a n...   Feb 6 2009, 01:25 AM
Mike   ^Using more than one font integrates compatibility...   Feb 6 2009, 06:12 AM
Genocide   1.0   Feb 6 2009, 01:22 PM
Mike   Use this: CODE<style> .profileInfo, .exte...   Feb 6 2009, 02:41 PM
Genocide   Thanks! That'd be all my questions.   Feb 6 2009, 04:01 PM
Mike   Alright. Topic closed & moved.   Feb 6 2009, 04:13 PM


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: