Border, width, height, z-index, position (absolute only), top, bottom, left, right, and for background see Images. Complete Borders assignment with this new knowledge.

Vanguard of the property parade

Now that you know a few HTML element types, it’s time to start styling them. We have a lot of properties to go through, and for many I will just give the property type and a list of possible values. But here is our adopted property index. Get comfortable with it. A bit confusing at first, but once you’ve consulted it a few times, you’ll know it’s invaluable. The link includes all properties in an overwhelming list. But note the affinity sets near the top, starting with Fonts, Text, and ending with Extensions (which we’ll ignore, by the way). I will often link to subpages within this most appreciated resource.

Ready? Don’t be nervous; I strongly suggest you play with all new properties immediately in a dummy web page. You know how. Here we go…

How to position an element in the window

div.species { position: absolute;
              left: 15%;
              bottom: 0;

Absolute is the only value I’m revealing for the position property at this point. This link won’t work for long, but Will used position for his ❝Hello World!❞: the HTML, the CSS. The other properties here will only work if you explicitly declare the position. So that first declaration is critical here. In general practice, you will use left or right for your x-axis, and top or bottom for your y-axis. Those are properties, and the values are just whatever units of measure you specify. New properties in summary:

  1. position: we will use only absolute for now; without this property, those below will do nothing at all
  2. top: distance from top boundary of browser window
  3. bottom
  4. left
  5. right

Oh, what was that?: ❝What happens if I position one element on top of another?❞ Then you’re dealing with the 3rd dimension, the z-axis. Something has to be on top. By default, the lower in the code an element is, the higher it will be in the z-axis. However, as with almost everything, you can override this.

div.genus   { z-index: 12; }
div.family  { z-index: 6; }

The z-index property accepts any non-negative integer. It’s all relative. You can use however big a value you want. In this example, the “genus” div will overlap, or be on top of, the “family” div, because 12 is bigger than 6. I believe the default for all elements is 1, but it could be 0. If two elements have the same z-index value, then the one later in the code will be on top.

How to size an element

div.order   { width: 80%; height: 48px; }

We are now in the realm of the box model, but we’re only partially covering it here. If you specify a smaller dimension than is needed, that is, if the content of the element in question doesn’t fit in the space you’ve given it, the element will become bigger than you want, as it grows to fit the content. These properties only affect block elements.

How to assign borders to an element

div.class   { border: 1px solid #f00; }

This is the simplest way to specify a border. It’s actually a shorthand property, meant to save you time. As a shorthand property, border takes multiple values in one declaration. They are separated by spaces. Breaking this down into its components, you could get the exact same results with:

div.phylum  { border-width: 1px;
              border-style: solid;
              border-color: #f00;

You can also specify different borders for different edges of an element. You can use shorthand for this:

div.kingdom { border-right: 4px dotted gray; }

The four edges you can append to border- are top, right, bottom, and left. Here is the long version, which just gets unwieldy:

div.domain  { border-right-width: 2px;
              border-right-style: dotted;
              border-right-color: gray;

But, yuck. By the way, border-bottom is a common way to make customizable underlines in CSS. Later on you will find out how to change the default, ugly underline for links and replace with your own special border-based underline.

Border-weight and border-color are straightforward. Following are the possible values for border-style. It all comes from our property index.

  1. solid
  2. dotted
  3. dashed
  4. groove
  5. ridge
  6. inset
  7. outset
  8. double
  9. none

No, you absolutely do not have to memorize those values for any quiz!

Summary of new properties

  1. position
  2. top, right, bottom, left: only work when paired with position
  3. width, height: only work with block elements
  4. border
  5. background: is next

7,276 Responses to “Position”

  1. nike pg1 says:

    nike pg1

    New boost adidas basketball shoes, deduce the road of dream and awakening

  2. kyire 3 says:

    kyire 3

    Hey There. I found your blog using msn. That is a very smartly written article. I’ll be sure to bookmark it and come back to learn extra of your useful information. Thank you for the post. I will definitely return.

  3. nike free tr 6

    Wear basketball shoes can run?

  4. kyrie 4 says:

    kyrie 4

    Bestellen erfahrung, generika per uberweisung kaufen und in osterreich verboten, au?er billig kaufen per uberweisung, rezeptfrei in deutschland. Preisunterschiede auch gunstig kaufen osterreich, generika preisubersicht und online bestellen ohne rezept…

  5. curry 4 says:

    curry 4

    I just wish to show you that I am new to putting up a blog and pretty much cherished your webpage. Very likely I am probably to save your blog post . You truly have fantastic article content. Like it for share-out with us the best web report

  6. curry 4 shoes

    Qingdao can degrade both will switch to shenhua second transfer agreement

  7. kyrie shoes says:

    kyrie shoes

    How to choose to suit oneself basketball shoes?

  8. curry 2 says:

    curry 2

    Durant don’t understand!Are all adults, why each time he warmed up before the game is just like a child!

  9. kyrie 3 says:

    kyrie 3

    A person essentially help to make seriously posts I’d state. That is the very first time I frequented your website page and so far? I surprised with the research you made to make this particular put up extraordinary. Great job!

  10. puma rihanna creepers suede

    An absolute classic!Air Jordan 1 will back to retro metal red basketball shoes

  11. Kyrie 3 n7 says:

    Kyrie 3 n7

    Very interesting information!Perfect just what I was searching for!

  12. グッチ財布コピー

    2017年人気貴族エルメス コピー安心専門店、 一流ブランドショップ、シャネル コピー、 付属品完備!送料は無料です(日本全国)! ご注文を期待しています!100%品質保証  満足保。※日本國送料無料、信用第一、

  13. binary options $270 to $22713 in 4 days live account

    Position ♥ Design for Information and Interaction on the Internet

  14. … [Trackback]

    […] Read More on|Read More|Find More Informations here|Here you can find 48744 additional Informations|Infos to that Topic: termsconditions.com/diii/?p=70

  15. best books for kids

    Position ♥ Design for Information and Interaction on the Internet

  16. http://www.modeltasransel.com

    Position ♥ Design for Information and Interaction on the Internet

  17. ehuhue sikik says:

    …Recommended websites

    […]you made running a blog glance[…]

  18. Long term goals essay

    Position ♥ Design for Information and Interaction on the Internet

  19. pokemon rpg says:

    pokemon rpg

    Position ♥ Design for Information and Interaction on the Internet

  20. ブランドコピー

    高級ブランド時計コピー N級品 2017年の新素材-新作!高品質 腕時計 高品質の追求 超N品を良心価格で提供 ご不明点が ございましたらお気軽にお問い合わせください 100%品質保証!満足保障!リピーター率100%! ホームページ上でのご注文は24時間受け付けております

  21. シャネルスーパーコピーN級品

    ブランド靴コピー \\\\\V///// 貴——-族——-店 /////V\\\\\ブランド服 ━━……━…━…━…━…━…━…━…━…━… _(._.)_ ルブタン 靴 コピー、シャネルブランド靴 グッチ靴激安コピー、バーバリー靴コピー クリスチャンルブタン靴コピー ━━……━…━…━…━…━…━…━…━…━…(* ^ – ^* ) ★*通販しますご注文を期待しています*★ ✿※✿不優待価格で、…

  22. GVK BIO says:

    … [Trackback]

    […] Read More on|Read More|Read More Infos here|Here you will find 15463 additional Infos|Infos to that Topic: termsconditions.com/diii/?p=70

  23. … [Trackback]

    […] Read More on|Read More|Find More Informations here|There you will find 46384 additional Informations|Infos to that Topic: termsconditions.com/diii/?p=70

  24. got kafa says:

    …For further Information click here

    […] What web host are you the usage of? Can I get affiliate hyperlink to your host? I wish web site loaded up as quickly as yours lol[…]

  25. DMPK Studies says:

    … [Trackback]

    […] Read More on|Read More|Read More Informations here|Here you will find 98892 more Informations|Informations on that Topic: termsconditions.com/diii/?p=70

  26. シャネル J12 ブランドコピー

    ネット通販ショップ ブランドコピー品の大SALE–ネット通販ショップ 当店はブランドコピーのスーパーコピー品通販専門店です。 商品は全てよい材料と優れた品質で作ります! ヴィトンスーパーコピー、シャネルコピー、 スーパーコピーバッグ、ブランド財布 コピー、 時計スーパーコピーなど人気ブランド品が豊富に取り揃えています。 品質保証&届け保証します! どうぞご安心にご利用ください。

Leave a Reply

You must be logged in to post a comment.