Archive for the ‘HTML & CSS’ Category.

Adding this post from Internet Explorer 9 to write about Internet Explorer 9

If you are using Windows and you are using Internet Explorer 9, you are becoming a minority.

W3Schools has a browser statistics site that basically is made by tracking the browsers that hit it.

http://www.w3schools.com/browsers/browsers_stats.asp

It is probably not exactly accurate because most poeple who go to W3Schools are probably in some way technical and doing some type of development, most likely for the web.  If there was a statistic built from the browsers that accessed the most popular pages on the web: Bing.com, MSN.com, Google.com, Yahoo.com, Youtube.com, Facebook.com, etc… then that would be accurate. But we make do with what we have.

This page shows that IE has a little over 1/4 the market share to start 2011, while it held over 1/3 the market share at the first of 2010.

2011 Internet Explorer Firefox Chrome Safari Opera
February 26.5 % 42.4% 24.1% 4.1% 2.5%
January 26.6 % 42.8% 23.8% 4.0% 2.5%
2010 Internet Explorer Firefox Chrome Safari Opera
December 27.5 % 43.5% 22.4% 3.8% 2.2%
November 28.6 % 44.0% 20.5% 4.0% 2.3%
October 29.7 % 44.1% 19.2% 3.9% 2.2%
September 31.1 % 45.1% 17.3% 3.7% 2.2%
August 30.7 % 45.8% 17.0% 3.5% 2.3%
July 30.4 % 46.4% 16.7% 3.4% 2.3%
June 31.0 % 46.6% 15.9% 3.6% 2.1%
May 32.2 % 46.9% 14.5% 3.5% 2.2%
April 33.4 % 46.4% 13.6% 3.7% 2.2%
March 34.9 % 46.2% 12.3% 3.7% 2.2%
February 35.3 % 46.5% 11.6% 3.8% 2.1%
January 36.2 % 46.3% 10.8% 3.7% 2.2%

So why am I telling you this, in my review of Internet Explorer 9?

Because I am telling you to get ready for the percent of IE users to rise again with the release of IE9.

So far, I have the following positive feedback.

  • Feature that weren’t working before, such as rounded corners on the red borders of the boxes on my blog, are working.
  • The browser opened with amazing speed. Yes, I didn’t just say speed, I said AMAZING SPEED.
  • The About:Tabs page that opens by default in a new tab is quite awesome and is pretty close to a replacement for the Speed dial
  • The cleanthiness of the browser is refreshing.

The negative feedback I have so far is simply one:

  • I tried to find a plugin but found the plugin page hard to find and I could not find a way to search for IE9 plugins.

Right now I dual boot between FreeBSD and Windows 7.  When I am booted to FreeBSD, I will use Firefox. Normally in Windows 7 I also use Firefox.  Right now, I am not going to install Firefox in my new Windows 7 install in my dual boot scenario unless I start to dislike IE9.

40 Web Sites for Web Developers: From Tripwire Magazine

40 Online Generators for Web Designers Should Bookmark

Quote:

Online Generators for Web Designers can be a great way to save time in your web design projects. High-quality generators can create graphics or code or even layouts in a matter of seconds or minutes, things that might take an hour or more if done by hand. Online generator are those tools that help us to create those popular “XHTML valid” CSS banners, micro buttons or css website templates in seconds. In such cases online generators can be of great help which do the necessary job and some tools don’t have to be downloaded also. We all know that backgrounds play a crucial role in a design. Web Designers sometimes spend a lot of time in making pattern or stripe backgrounds and there are also tool to help you out here. In this article, I have listed some of the online generators that can save you some time and still give you great results.

Read more…

The perfect layout for a three column blog

I have always wanted the perfect three column design for my blog. I stumbled across this web site and I think this is the probably as good as it gets.

Holy Grail 3 column liquid-layout: No Quirks Mode, No IE Conditional Comments

This is by Matthew James Taylor and I have to say I am very impressed.

I renamed the CSS id’s to something easier for me to remember. I added a navigation bar, and another div to give a white space on the right and left.

Here is the basic html:

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<head>
  <title>Site Title</title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
  <style type="text/css">
  body {
      margin:0;
      padding:0;
  }
 
  #ContainerMain {}
 
  a {
      /* color:#369; */
      text-decoration:none;
  }
 
  a:hover {
      text-decoration: underline;
  }
 
  h1, h2, h3 {
      margin:.8em 0 .2em 0;
      padding:0;
  }
 
  p {
      margin:.4em 0 .8em 0;
      padding:0;
  }
 
  img {
      margin:10px 0 5px;
  }
 
  #Header {
      float:left;
      width:100%;
      padding:0;
      margin:0;
      border-bottom:1px solid #000;
      background: #CCC;
      color: #FFF;
  }
 
  #Header p {
      padding:.5em 15px    .2em 15px;
      margin:0;
  }
 
  #Header h1  {
      padding:.2em 15px;
      margin:0;
  }
 
  #Header h2  {
      padding:.2em 15px    .7em 15px;
      margin:0;
  }
 
  #NavBar {
      float:left;
      width:100%;
      padding:0;
      margin:0;
      border-bottom:1px solid #000;
      background: #EEE;
      color: #FFF;
 
  }
 
  #ContainerColumns {
      margin-left: 20px;
      margin-right: 20px;
  }
 
  #ContainerLeft {
      position:relative;  /* This fixes the IE7 overflow hidden bug and stops the layout jumping out of place */
      clear:both;
      float:left;
      width:100%;         /* width of whole page */
      overflow:hidden;    /* This chops off any overhanging divs */
      background:#ffd8b7; /* Left column background colour */
  }
 
  #ContainerMiddle {
      float:left;
      width:200%;
      position:relative;
      left:200px;
      background:#EEE;    /* Centre column background colour */
  }
 
  #ContainerRight {
      float:left;
      width:100%;
      position:relative;
      left:50%;
      margin-left:-400px;
      background:#ff9;    /* Right column background colour */
  }
 
  #ColumnMiddlewrap {
      float:right;
      width:50%;
      position:relative;
      right:100%;
  }
 
  #ColumnMiddlepad {
      margin:0 15px 0 415px;
      overflow:hidden;
  }
 
  #ColumnMiddle {
      width:100%;
      overflow:hidden;
  }
 
  #ColumnLeft {
      float:left;
      width:170px;
      position:relative;
      margin-left:-50%;
      left:215px;
      overflow:hidden;
  }
 
  #ColumnRight {
      float:left;
      width:170px;
      position:relative;
      left:15px;
      overflow:hidden;
  }
 
  #footer {
      text-align: center;
      clear:both;
      float:left;
      width:100%;
      padding:0;
      margin:0;
      border-top:1px solid #000;
      background: #CCC;
  }
 
  #footer p {
      margin: 0px;
      padding: 0px;
      font-size: 12px;
  }
  </style>
</head>
<body>
  <div id="ContainerMain">
    <div id="Header">
      <h1>Site Name</h1>
      <h2>Site Tag Line</h2>
    </div>
    <div id="NavBar">Home</div>
    <div id="ContainerColumns">
      <div id="ContainerLeft">
    <div id="ContainerMiddle">
      <div id="ContainerRight">
        <div id="ColumnMiddlewrap">
          <div id="ColumnMiddlepad">
        <div id="ColumnMiddle">
          <!-- Column 1 start -->
          <p>Middle Column</p>
          <p><a href="www.rhyous.com">http://www.Rhyous.com</a></p>
          <h1>Heading 1</h1>
          <h2>Heading 2</h2>
          <h3>Heading 3</h3>
          <!-- Column 1 end -->
        </div>
          </div>
        </div>
        <div id="ColumnLeft">
          <!-- Column 2 start -->
          <p>Left Column</p>
          <!-- Column 2 end -->
        </div>
        <div id="ColumnRight">
          <!-- Column 3 start -->
          <p>Right Column</p>
          <!-- Column 3 end -->
        </div>
      </div>
    </div>
      </div>
    </div>
    <div id="footer">
      <p>Footer</p>
      <p>This is where you put your footer stuff.</p>
      <p>
      <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" />
    </a>
      </p>
    </div>
  </div>
</body>
</html>

Using CSS to make an html numbered list have text before the number

I often use lists that look as follows:

  • Is in the format of Step #
  • Doesn’t indent.

It is a little more complex than it needs to be to do this in HTML but still doable.  The below list is an example.

  1. The first thing to do.
  2. The second thing to do.
  3. The third thing to do.

So how is it done? Well, it is done with CSS.

  1. Add your CSS
    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    ol.Steps {
        counter-reset: section; // Make sure each new list starts at 1.
        list-style-type: none;     // Removes the standard numbers.
        padding: 0;                   // Removes padding so there is no indent.
        margin-left: 0;               // Removes margin so there is no indent.
    }
     
    ol.Steps li:before {
         counter-increment: section;                  // Defines the counter increment to use.
         content: "Step " counter(section) " - ";  // Adds content before your content.
    }
  2. Add your html
    1
    2
    3
    4
    5
    <ol class="Steps">
        <li>The first thing to do.</li>
        <li>The second thing to do.</li>
        <li>The third thing to do.</li>
    </ol>

Easy enough.

This is also good when you need any word in front of the number such as: Chapter, Section, Item, etc…

Checking for html errors in your website or blog

So in doing a new web site or blog site, an error can be problematic.  One browser might ignore it, but another can completely be messed up.

You may open your website in Firefox and everything looks fine.  But then you check Chrome, IE, Opera, Safari, and in one or more of them your website looks completed messed up.

How to find html errors in your site

Well, this is where http://validator.w3.org comes in.  This web site will “browse” your website for you and parse the html in your website and report back errors.

  1. Go to http://validator.w3.org.
  2. Enter your URL in the Address text field.
  3. Click Check.

If you have errors they will be displayed, as well as the line number in your html source where the error occurs.

If you don’t have errors you will get a “Congratulations” and also be provided with some code to put on your site to say that your site is checked and “valid”.

Valid XHTML 1.0 Transitional

Being Thorough

For a static website, this is easy.  Check your pages once and since they rarely change, you are good for a long time.

For a blog, this is more complex. To be thorough you would have to check every post. Or only check a post if it is a problem.