web design tips
Use Shorthand Css
Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all – it makes the code easier to understand.
Instead of creating CSS like this
It can be short-handed into the following:
Understanding Class And ID
These two selectors repeatedly confuse beginners. In CSS, class is represented by a dot “.” while id is a hash ‘#“. In a nutshell id is used on style that is distinctive and don’t repeat itself, class on the other side, can be re-use.
Forget <Table>, Try <Div>
One of the greatest advantages of CSS is the use of <div> to attain total flexibility in terms of styling. <div> are unlike <table>, where substances are ‘locked’ within a <td>‘s cell. It’s safe to say most <table> layouts are attainable with the use of <div> and proper styling, well maybe except considerable tabular contents.
Padding is the space between the border of an HTML element and the content within it.
Padding of an element in a single property as follows:
padding: 10px 10px 10px 10px;
If you declare all four values as above, the order is as follows:
Top, right, bottom, left
Step 1: Open a new document in flash. Set the stage color as black.
Step 2: Choose Window > Properties from the main menu bar to open the PROPERTIES panel.
Step 3: Expand the Properties section in the panel and choose the Edit button to enlarge the Document Settings window. Next, set the width to 550 px and height to 450 px in the PROPERTIES panel, as shown in Figure below. Choose the Ok button.
Step 4: import an image to perform the action script. Choose File > Import > Import to stage from the main menu bar and Import the unzipped images file. The three files will be imported to the stage, as shown in Figure below.
Step 5: Perform some actions to this image. From the timeline create new layer to the name them as figure follows
Step 6: Now we will use some action script. To make the thumbnails function and to rotate them around the main image.
Follow the steps to complete the tutorial.
1. Open a new flash file. Choose Window > Properties from the main menu bar to open the PROPERTIES panel.
2. Expand the Properties section in the panel and choose the Edit… button to enlarge the Document Settings window. Next, set the width to 500 px and height to 300 px in the
PROPERTIES panel, as shown in Figure below. Choose the Ok button.
3. Now we will import the images to be used in this tutorial. Unzip the VMask_tutorial.rar file that you downloaded.
4. Choose File > Import > Import to stage from the main menu bar and Import the unzipped images file. The three files will be imported to the stage, as shown in Figure below.
5. The images are not aligned on the stage area. To align them, choose Window > Align from the main menu bar; the ALIGN panel is displayed, as shown in Figure below.
6. Next, select all the three images on the stage and select the Align to stage checkbox from the ALIGN panel and choose the second button from left under the Align and the Distribute area. The images will be aligned to the stage.
7. Now, let us distribute these images on different layers. To do so, right click on the images when they are selected and choose Distribute to Layers… from the fly out, the images are distributed in different layers.
8. Next, convert the images into symbols. Select img1.jpg and choose Modify > Convert to Symbol from the main menu bar; the Convert to Symbol window is displayed; as shown in Figure below.
9. Name the movie clip symbol as img1 and choose the OK button. The image is converted to movie clip symbol. Similarly, convert img2.jpg and img3.jpg into movie clip symbols.
The movie clip helps to manage a image in a better way. Also, it will help us to apply filters and other effects to the mages in a better way.
10. Set the visibility of img2 and img3 layers to off. Next, select the img1 movie clip and choose Modify > Convert to Symbol from the main menu bar and name the movie clip as masking1.
11. Double-click on the masking 1 movie clip and next create a key frame on frame 30 in the timeline, as shown in Figure below.
12. Next, set motion twining between the two key frames. Select the key frame on frame1 and place the img1 movie clip around 30 pixels down from its original place, as shown in Figure below.
13. Next, create a new layer and name it as mask 1. Create a rectangle with width 500px and height 60px, as shown in Figure below.
14. Select the rectangle and choose CTRL + g to make it as a grouped object. Next, create 4 copies of the rectangle just created and align them to as shown in the Figure below.
15. Select all the five rectangle shapes and right click on them and choose Distribute to Layers to distribute them to different layers. Rename the layers as mask1, mask2, mask3, mask4, and mask5.
16. Next, activate the layer named layer1 and rename it to anim1 and select the image movie clip at the first key frame and choose Window > Properties from the main menu bar; the PROPERTIES panel is displayed.
17. Add Adjust Color filter to the selected movie clip and set the following values in its parameters to get and effect as shown in Figure below.
18. Set the alpha to zero for the movie clip on the first frame.
19. Next, create 4 copies of the anim1 layer and rename them as anim2, anim3, anim4, and anim5. Now, make sure that each anim layer is placed below one mask layer, such that the timeline panel looks as shown in Figure below.
20. Now, right click on the mask1 layer and choose mask from the fly out. Similarly, set mask for mask2, mask3, mask4, and mask5 layers and align the frames in the timeline to as shown in Figure below.
21. Press ENTER and have a look on the masking transition effect. You can tweak the animation as per your needs and requirements.
22. Next, go to the main stage and similar transition effect to the other two images and make a timeline animation to create a photo show transition effect.
The HTML <base> tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point.
The <base> tag must be between the document’s <head> tags. Also, there must be no more than one base element per document.
Modify the code below, then click “Update”. See below for attributes.
Step-1 Open a new document in flash. Set the stage color as black.
Step-2 Create four buttons for smoke colors transformation in Layer-1. Give the instance name for each button. Here I gave one_btn, two_btn, three_btn and four_btn.
Step-3 Type the following Action Script in Layer-2.
Step-4 Import smoke effect images to library. Images name should be same as in library and script. Go to library panel and right click on each image. Choose Properties à Linkage. Check the “Export for Action script” option.
Run the program.
Step-1 Open a new document in Flash. Import an Image 1 and Image 2 in Layer 1 and Layer 2 respectively into the stage. Change that image2 to Graphic (F8).
Step-2 Right click on the graphic then select edit in place. Draw rectangle in the size of 40px X 450px in layer 2. Copy (F6) the layer 1 & 2 frames till 90 or 100.
Step-3 Apply shape tween for layer 2 and mask layer 1 in layer 2. In the 100th frame resize the rectangle to 740px width.
Step-4 Copy the Layer 1 image and paste it in layer 3. Apply Classic tween for layer 3. In the 1st frame move the image to left side out of from the stage. In the 100th frame move the image to right side out of from the stage.
Step-5 Again draws a rectangle in layer 4 in the size of 40px X 450px. Copy the frame till 100. In the 1st frame place the image on the left side but not out of from the stage. Like that, in the 100th frame move the image to right side.
Step-6 Apply Shape tween and mask layer 3 in layer 4.
Step-7 At last draw rectangle in the size of 40px X 450px in layer 5. Apply gradient in the ratio of #7E7E7E, alpha, alpha, #FFFFFFF.
Step-8 Now comes out of the graphic. Copy the layer 1 frames till 225. In layer 2 insert blank key frame till 100 and start copy the frames from 101 to 225.
Run the program.
OUTPUT (in IE) AFTER FIXING THE SOLUTION:
OUTPUT (in IE) BEFORE FIXING THE SOLUTION:
The main script should be added to thesection. It only can access the HTML5 in IE. Without the below script you will not get the required output.
Step:1 Open a new HTML Document in dreamweaver.
Step:2 Paste the following code in the HTML Document.
Step:3 Create embedded <style> style below <head> tag. Add the following CSS Code:
Step:4 Place required images inside your HTML file folder.
Now run the Program.
Step-1 Open an html document. Write the following html code inside the body tag:
Step-2 Create a new CSS document and write the following CSS syntax and save it as MAIN.CSS.Here background position defined to draw the different position of the button into visible.
Step-3 Paste the following code inside the <head></head> tag in HTML file to link the MAIN.CSS.
Step-4 Your HTML, CSS and below images should be in same folder.
Now run the program.