Tuesday, April 30, 2013

Last blog of the year! Headers, Footers, Columns & Templates!

I find myself very humbled as I write this. This will be my last blog post for Web Design. Not only that, but I'll be graduating within two weeks. It is all very surreal how quick the semester has gone by. Anyway, enough of that! Onto what we covered last week!

Headers, Footers, Columns & Templates.

We discussed content priority and designated certain content to certain categories. For example, Primary content features content that is matter around which individual destination documents are built, such as articles, photo albums, or datasets. Next we have Secondary content. This content includes human-readable metadata attached to the primary content such as links, reviews, tabs, maps, sidebars and everything in between. Finally, we have tertiary content. This contains outgoing links to other sources such as social media, rss feeds, comments, and advertising.

Next up we have the header. The header will include the title, primary navigation, links to account metadata and main content search forms.

Next, the footer. The footer contains the copyright statement, links to documents composed of metadata like RSS feeds and site metadata including contact info. There also might be secondary navigation.

Primary navigation can be included in the header as part of its visual context or in can be made as a sidebar. It is all dependent on what the implementer chooses. 

The Ideal Content Order should be :

  1. Header
    • Title
    • Primary navigation
  2. Primary content
    • Document title
    • Body copy
  3. Secondary content
  4. Tertiary content
  5. Footer
    • Secondary navigation
    • Additional bits (eg, copyright notice)

    There are also ways in which you can choose to format your layout. It can be a single column layout, double column, or a three column layout.
The main difference between the single column layout and the double column layout is the addition of a siderbar. If it's a three column layout, there will be two sidebars. One trick to appropriately fit the sidebars are:
  1. Assign a width value to #bodyCopy.
  2. Add to that rule a float value of right.
  3. Assign an appropriate width to #sidebar.
  4. Assign margin and padding values as needed to #bodyCopy and/or #footer by way of ensuring that the desired gutter exists between the two elements.
  5. Assign clear: both; to #footer.

One more important note is*
Because your columns may not be the same height it makes visual design complicated in multi column layouts.

Assigning a background image to the ancestor element of your columns can give the appearance of different colored columns or a divider between columns.


Because we want the content to look good and for it to be even, it can be beneficial to apply a background image in order to make it look more appropriate. 

That's all! It's been a great semester and I've enjoyed taking your class! 
 

 

Tuesday, April 23, 2013

Positioning!

Last week in class we covered positioning! This awesome CSS property has four legal values which are: static, relative, absolute, and fixed. When HTML is rendered on your web page or when its printed out, the elements that are generated are in rectangular boxes. Although these boxes appear invisible, the shape of the element is a rectangle.

The default positioning property is static. Even when CSS in not applied, the default layout of the content is static which means it isn't really moving at all. The content is merely laid out in the order it appears.

Block elements are laid out vertically from top to bottom. Another important thing to note is that even if you adjust the width of the boxes/ content it will still be laid from top to bottom instead of side to side.

Inline elements are the opposite. They are laid out from side to side and can be specified by horizontal margins, NOT vertical ones.

Next positioning property is relative positioning. At first the element is laid out like your standard static position but then, it's shifted according to the top, bottom, left, and right properties.

Absolute position is the next positioning property and it literally is the ABSOLUTE position. What I mean is that not only does it not have any effect on the parent element or any elements that occur after in the same code, it is entirely removed from the document flow. This means that an absolutely positioned element will overlap other content unless you do something to prevent this action.

Finally, we have fixed position. Fixed position is more like a specialized version of absolute. Fixed means it fixed relative to the browser window rather than the containing element. This means that even if you scroll down a page, the content is in the exact same position as the browser window.

Another unique advantage when it comes to position is that you can use all four properties at the same time. This is done by specifying the distance from each edge of the positioned element to the corresponding edge of the containing block. You can also specify the position of one of the corners of the absolutely positioned box—say by using top and left—and then specify the dimensions of the box using width and height 

Another important note about absolute positioning is about the containing block: which is the block box that the position and dimensions of the absolutely positioned box are relative to. For static boxes and relatively positioned boxes the containing block is the nearest block-level ancestor—the parent element in other words.

RELATIVE:
#div-1 {
position:relative;
top:20px;
left:-40px;
}

ABSOLUTE:
#div-1a {
position:absolute;
top:0;
right:0;
width:200px;
}
FIXED:
#div-1 {
 height:800px;
}

#div-1a {
position:fixed;
width:380px;
}
 RELATIVE + ABSOLUTE
#div-1 {
position:relative;
}
#div-1a {
position:absolute;
top:0;
right:0;
width:200px;
}

You can also use floats as a means of positioning as well as two to three column layouts.

 




 

Tuesday, April 16, 2013

Styling lists, links, tables, forms, & Floats and clearing

Last week we dived deeper into CSS by starting off with styling lists and links. With the lists, we learned how to make ordered and unordered lists with margins around them. We could also change the weight of the font and other aspects in order make the lists visually appealing. Another important aspect was that of the nested lists and how it should be indented within the code in order to better understand the relationship.
"When you create your CSS you should be careful to maintain clear design cues to show the relationship between a nested list and the list that contains it. By far the most common way to do this is by indenting the nested list items—it is in fact the default setting across the browsers."

Example:
<ol>
 <li>Chapter One
   <ol>
     <li>Section One</li>
     <li>Section Two </li>
     <li>Section Three </li>
   </ol>
 </li>
 <li>Chapter Two</li>
 <li>Chapter Three  </li>
</ol>
The indentations illustrate how the layout should be with the headings and subheadings. Another thing to consider was styling links. 
a {}
a:link {}
a:visited {}
a:focus {}
a:hover {}
a:active {}
By setting the style links accordingly, user can see that they're interacting with a link when they move their cursor over it and such. You can also apply text decoration and outlines to it.
The next thing we covered were tables and how to style them by adding captions, adjusting the size of the borders, the colors, and the padding and margins of the content being featured.
Next, we went over styling forms. The majority of CSS that is used for forms has already been covered and is applicable to setting up your preference for the forms you want to use. Some generic code for this would be:
body{
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
}
   
Finally, we went over floats and clearing. The biggest thing with floats is positioning your boxes and where you want them to be laid out. For example,
.box1{
            float: left;
            width: 50px;
            height: 50px;
            background-color: yellow;
            border: 2px solid black;
        }
As you can see, you can adjust the behavior of the float and whether you want it to float left or right. Next, you could adjust the weight and height in order to meet your specifications. You also control the background color and the color and weight of the font you want for your content. You also can set clearings so that the boxes clear your content if that is something that you would want. Clearing would allow the boxes to drop below the content to add a different stylistic look.
  

 

Tuesday, April 9, 2013

CSS Text Styling, Inheritance and Cascade, CSS Layout & Background Images

Last week we discussed and went over more CSS functions and how these features can make the "look" of your website stand out.
One major thing we learned was how inheritance is used within CSS. By using inheritance, we can structure the way we want our content to appear through the hierarchy of of inheritance. Let's say we wanted one paragraph to have a certain background color with a particular font color. Let's also say we have several h tags throughout the code. By adding a certain element to the "parental" tags, the element will then be passed down, or "inherited" by the "children" tags.
Another concept was that of the cascade. The Cascade controls the end result when you have multiple, conflicting CSS declarations that are being applied to the same element. There are 3 concepts that control the order in which the CSS declarations are applied and they are
1. Importance
2. Specificity
3. Source Order

Importance depends on where it is specified. For example,
p {  
font-family: "Comic Sans MS";
}

- VS -

p {
 font-family: "Comic Sans MS"
!important;
}
Specificity requires you to identify which part of the element you want to affect. ID tags can be used however they can only be used once. Attributes and Class are less specific and then element types are the least specific.
If two or more declarations are of the same importance and have the same specificty, the source order would then determine the end result. With source order, the declaration that appears last, will overtake the others. Therefore, the most recent code written on the bottom (the one which appears last) will have the final determination.
Another concept that was discussed was CSS styling regarding fonts. With fonts, you can change the size, the weight, height, variant, and everything that can aid in elaborating and drawing attention to specific words.

One thing CSS can also apply are margins and borders around your content. You can adjust the margins and create "padding" around paragraphs and content to highlight it in some sense.

Another way to highlight some content on your website is to use background images and then lay your content on top of that. This can help provide extra emphasis and subtext to your website and make it more aesthetically pleasing.

CSS can provide a variety of options to enable a functional, user-friendly, and fascinating website.