Free CSS Layouts

Sunday 22nd of January 2017 01:02:59 PM

Free CSS Layouts

Under CSS2, the same effect can be achieved without the use of aclass on the first paragraph. This is done by using new CSS2selectors, such as the adjacent-sibling selector:

 H1 + P {text-indent: 0;}

In a CSS2-aware user agent, this will set atext-indent of 0 for anyparagraph which immediately follows any H1element. However, since the paragraph here is the child of aDIV, it doesn't immediately follow the

Please feel free to borrow, steal, abduct, and/or torture the documents contained here. Enjoy.

Two Column Layouts

2 columns - left menu

A simple two column layout with the standard left-side menu.

2 columns - right menu

Practically the same HTML as 2 columns - left menu, but with a different stylesheet.

Three Column Layouts

3 columns - flanking menus

Three columns, no tables, intelligent order of elements. What more is there to say?

Many a talented web designer has struggled with CSS-based centering. Though CSS vertical centering eludes us, two techniques for horizontal centering are approved. Take your pick: Auto-width Margins or Negative Margin.

6.1.1.2. Affecting borders

The value of color can also affect the borders around an element. Let's assume that you've declared these styles, which have the result shown in Figure 6-6:

P.aside {color: gray; border-style: solid;}
Figure 6-6

Figure 6-6. Border colors are taken from the content's color

"Normal" or "Medium." This method is alsoused for 200 and 100.

  • If 600 is unassigned, it is given the next variantdarker than 400. If no darker variant isavailable, 600 is assigned the same variant as500. This method is also used for700, 800, and900. underlining for the B element. Navigator, Explorer, and Opera all do this, if there is an explicit text-decoration: none to cause the suppression of underlining. This is, of course, what an author would tend to expect, and that's why the browsers do it.

    Figure 4-61

    Figure 4-61. How browsers really behave

    The caveat here is that browsers (or any other user agents) might one

    border-top, border-right, border-bottom, border-left

    It's possible to use these properties to create some complex borders, such as those shown in Figure 7-46:

    H1 {border-left: 3px solid gray;
    border-right: black 0.25em dotted;
    border-top: thick silver inset;
    border-bottom: double rgb(33%,33%,33%) 10px;}
    Figure 7-46

    Figure 7-46. Very complex borders

    As you can see, the order of the actual values doesn't really

  • Web-based applications are similar to app servers, except for one thing: Web-based applications don't have client apps, instead they use web browsers on the client side. They generate their front ends using HTML, which is dynamically generated by the web-based app. In the Java world, Servlets are best suited for this job.

    Web-based apps might themselves rely on another app server to gather information that is presented on the client web browser. Also, you can write Servlets that get information from remote or local databases, XML document repositories and even other Servlets. One good use for web-based apps is to be a wrapper around an app server, so that you can allow your customers to access at least part of the services offered by your app server via a simple web browser. So web-based apps allow you to integrate many components including app servers, and provide access to this information over the web via a simple web browser.

    Web-based apps are very deployable, since they don't require special Java VMs to be installed on the client side, or any other special plug ins, if the creator of the web-based app relies solely on HTML. Unfortunately, this can restrict the level of service that can be offered by a web-based app when compared to the functionality offered by custom clients of an app server, but they are a good compromise when it comes to providing web-based access to your information. In fact, in a real world scenario, both a web-based app and app server may be used together, in order to provide your customers access to their information. In an Intranet setting, you might deploy the clients that come with the app server, and in an Internet setting it would be better to deploy a web-based app that sits on top of this app server, and gives your customers (relatively) limited access to their data over the web (via a simple web browser).

    Web-based apps and app servers integrate very well, and this is another reason why Java and XML make a powerful combination for developing systems that give your customers access to their information from anywhere, using any browser over the web. In the future, you can imagine various different web-based apps servicing different kinds of clients, e.g. web browsers on desktops, web browsers on PDAs, and web browsers on all kinds of different consumer electronics devices. By keeping your information structured in a pure way (by using XML), and by allowing access to this information through app servers, you can write many different web-based apps that render this information by customizing it uniquely for each different device that is allowed access to this information. This is more a more scalable solution that storing all this information in web pages, even if these web pages are dynamically generated. So you can have one app server that stores all the data in XML format. You can write a web-based app (which sits on top of this app-server) that allows PalmPilots to access this information over the web. You can write another web-based app (that also sits on top of the same app server) that allows conventional web browsers to access this information over the web. XML and Java have the potential to make this truly platform independent and device independent computing a reality.