How To Make A Rubber Header For A Website

Table of contents:

How To Make A Rubber Header For A Website
How To Make A Rubber Header For A Website

Video: How To Make A Rubber Header For A Website

Video: How To Make A Rubber Header For A Website
Video: How To Make A Website Header Using HTML And CSS | Add Video Background On HTML website 2024, May
Anonim

When creating a website on the Internet, one of the most important points that a developer must take into account is its functionality, versatility and performance. In order for the site to be fully and correctly displayed in any browser on computers with a wide variety of screen resolutions, you can create a convenient "rubber" header, consisting of several graphic elements.

How to make a rubber header for a website
How to make a rubber header for a website

Instructions

Step 1

In the first step of creating such a header for a website, open in Photoshop the image that you have already prepared for posting on the web, and then cut it into pieces using the Slice Tool in the toolbar. Cut the header so that the center part is empty, so that you end up with three graphic elements. This will allow the header to stretch for any screen resolution.

Step 2

After you cut the header, save it, optimizing the files when saving for the web format (Save for web). Set the desired file format for saving - for example, gif, jpeg, or png. To change each fragment of the image, click on the Slice Select Tool option in the menu and resize the pictures so that their size is as small as possible with the least loss in the quality of the visual display of the picture on the screen. Save your edited images as html and images.

Step 3

After the pictures are saved, edit the HTML code by opening the saved html document with Notepad. In notepad, erase all unnecessary lines of code. Leave only the necessary lines - data about the table in which your pictures are embedded:

Step 4

In these lines, instead of yourimage.gif, the path to your images with the appropriate width and height should be specified.

Step 5

In order for the middle part of the image to stretch, spreading the extreme images to the sides, write the corresponding code attributes in the lines. Specify your own width and height parameters in the code.

Step 6

Upload the generated header images to the root directory of your site, and then edit the HTML code with new paths to the header images on the server. Paste the header code between the tags.

Recommended: