Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Monday, June 14, 2010

Pre Tags Styling Tutorials & Resources



The ‹pre› tag is used to display preformatted text or code snippet to a web page. Some web design related blogs would use simple plugin that easily post syntax-highlighted code with its complete functionality (ie: view source, copy to clipboard, print). However, you can style this ‹pre› element to appear neat, stylish and usable by having deep understanding of how this web element works especially in different browsers. Here are some tutorials and resources about ‹pre› Tags Styling to get you start with.


Styling Code Snippets with CSS by Soh Tanaka





Read More

Friday, October 17, 2008

»» CSS Tips

In this post we will see about some random collection of CSS Tips and Tricks... These tips will really help the beginners to know much about the usage of CSS in graphic design. All these tips and tricks are very much easy to get followed by all of us. So just check all these links and make use of it.
Enjoy your graphic design with more CSS tips....

Thursday, September 25, 2008

»» CSS Techniques - Part 3

1. Creative Use of PNG Transparency in Web Design
With proper PNG support in Internet Explorer 7, and some handy JavaScript and CSS tricks to account for older browsers, we can use PNG images to greatly enhance our design vocabulary. Just check this out....


2. 13 Awesome Java Script CSS Menus
13 “fresh” Java Script+CSS-based navigation menus in a brief overview. Among other things Slashdot Menu and Sliding Menu displayed below.

3. How to create VISTA style toolbar with CSS?
Reproducing Vista toolbar, with buttons and hover effect in cross-browser compatible CSS and (X)HTML.


4. CSS Speech Bubbles
Easy to customize speech bubbles coded in CSS and valid XHTML 1.0 strict.Tested in all major browsers.




Tuesday, September 23, 2008

»» CSS Techniques - Part 2

1. CSS Tabs
Here we'll look at using CSS to build a tabbed display. One where the user can click on individual tabs to view different content within the same space.

2. Dock Menu
Check this Dock Menu, it is really cool and I used it in one of my college project website.

3. Star Rating using CSS
Here is the original CSS star rater in all of its goodness.


4. PNG Overlay
Another way to add flare to images (rounds the corners and adds a border and drop shadow).


Monday, September 22, 2008

»» CSS Techniques - Part 1

CSS plays a vital role in graphic designing, right? Here I am going to list out some links for the CSS techniques, just check it out....

1. Hoverbox Image Gallery

2. Navigation Menu

3. A CSS Styled Table

4. CSS Bar Graph

Friday, September 12, 2008

»» Browser Support for CSS

CSS rules are always interpreted by Web browsers, just as the HTML pages those rules style are interpreted. The HTML and CSS standards give specifics on how browsers should display those rules—but they're not always followed. To design pages with CSS, you not only need to know the standards, as presented in the CSS specification, but also understand how browsers' quirks and flaws will affect your Web design results.

The Browser Problem

A Web browser is the essential Internet access tool of the early twenty-first century. Browsers are now indispensable to business, education, and personal communication. They create a common platform upon which Web-based applications can be built, with an HTML framework driving e-commerce, business-to-business transactions, Web-based learning, and online communities. Hundreds of thousands of pages of new information are added to the Web each day. Cascading Style Sheets play a crucial role in this communications medium by not only providing a pleasant visual layer on the surface of these Web applications, but also by potentially reshaping the entire user experience.

So what's the problem? In short: Web browsers have been inconsistent in their support for CSS.

There are many reasons for this. Some early browsers, such as Netscape 3, were created before the CSS specification was published. Some browsers jumped the gun. Microsoft is notorious for rushing ahead and using draft specifications of standards in their browsers, and then the specifications get changed. And sadly, some browsers are just plain bad. They may seem to function normally, but when it comes to consistent and standardized support for CSS, they fall very short. The good news is that the problem is being solved. Slowly but surely, each new major browser release is better than the last, and you can get pretty decent CSS implementations from Firefox, Opera, Safari, and other browsers. When a browser encounters anything—from CSS rules to HTML, JavaScript to Flash multimedia—it has several choices as to what it can do. If the browser has been programmed to understand the thing it has encountered, it attempts to display it according to the specification. If it has no idea what it has come across, it can ignore it. Both these options can be considered "doing the right thing." Or the browser can do the wrong thing. It can get confused; it can display in some nonstandard way; it can even crash, although that's rare. Doing any of these wrong things, of course, is the least desirable and is at the root of our problem. Cascading Style Sheets were designed from the start to degrade gracefully. This means that if your CSS rules aren't recognized for some reason, your page is still usable and the content accessible. Because presentation is separated from content, the content should be able to stand on its own, albeit not as beautifully, after the presentation is removed. At least, that's the theory. In practice it's not nearly as easy as that. To be an effective CSS author, you need to know not only what works in any given browser—or in most or all of them—but also what happens when it doesn't work. Is it as simple as your style not being applied correctly and a bit of decoration being lost, or is it as serious as your entire layout being disrupted and content being lost?

Compliance and Lack

Thereof You need to understand what happens in each case of browser failure to know how to approach each browser. When a browser fails to correctly understand and apply a CSS rule, the browser may just ignore the rule and your design will be fine. Or, because of a browser quirk or bug, it may ignore the rule and your page could become unreadable. As a designer, you need to weigh each style rule carefully and know what effects will result if browsers don't understand and apply it. In some cases, you may want to use CSS properties that aren't well supported; you may figure that you don't mind some users missing out on a special styling if it improves the site for those users with more advanced browsers. In other cases, you may decide you can't take that chance, and you'll have to make a choice whether to support the broken browsers with workarounds or ignore that audience. For example, consider a CSS rule that makes the first letter of each section stand out large in a stylized font. This may just be simple decoration, and if the font is normal sized in some browsers, so be it; it may not affect at all the way your page functions. In other situations, you may be forced to either abandon certain types of style rules that are perfectly valid and useful simply because some major browsers don't support them. An alternative to this approach is to make special modifications, called browser hacks, which allow your style sheets to work despite browser problems. The most common of these is called a filter; a filter prevents certain browsers from reading specific CSS rules that might cause them problems. You'll learn more about browser hacks and filters in Hour 24, "Troubleshooting and Browser Hacks."

To understand how browsers deal with CSS, I've divided them into four categories: ancient browsers, which pre-date the CSS specification and thus ignore it completely; broken browsers, which try to provide CSS functionality but fail horribly in some manner; quirky browsers, which have generally decent CSS support but a number of "gotchas" where they don't quite measure up; and compliant browsers, which do a good job of presenting CSS as it's meant to be. Each category of browsers treats style sheets differently, and it's important to understand what those differences are and how you can design for those browsers.

Wednesday, September 10, 2008

»» MyEclipse Cascading Style Sheet (CSS) Editor

In this post we will see about the CSS editor in MyEclipse. Enhanced Cascading Style Sheet editor provides an enhanced CSS authoring functionality with enhanced support for editing CSS source files. Features include:

  • Smart editor with content assist and color coding
  • Outline view for easy navigation
  • CSS property details

To download MyEclipse click here.....

Monday, August 11, 2008

CSSnewbie Contest

CSSnewbie celebrates the August with the first-ever CSSnewbie Contest! CSSnewbie is one of our favorite CSS resources website. We have joined with over 1400 happy readers by subscribing to CSSnewbie email feed about a month now and absolutely happy reading the wonderful updates so far.

How to enter?

Read More

You just need to subscribe to the CSSnewbie RSS feed and if you’re already a subscriber, you don’t have to do anything else except remain the subscriber you are.

Watch for a pass-phrase to appear at the bottom of an article in CSSnewbie RSS feed. The pass-phrase won’t be present in every article, but it’ll be there often enough that you’ll be able to find it if you’re looking for it.

Once you’ve found the pass-phrase, shoot an email to contest@cssnewbie.com. The subject line should be the pass-phrase and nothing else. The body of the message should contain a link to the website you’d like to have reviewed/promoted, and can also contain any other comments you’d like to include. Email them before the contest ends at the end of the day (11:59PM Central Time) on August 31, 2008.

CSSnewbie Subscriber Contest

The winner will receive:

1. A review of your website on CSSnewbie.
2. Eric Meyer’s book, CSS Pocket Reference: Visual Presentation for the Web.

Sounds great isn't it? Start your entry by visiting this cool CSSnewbie blog and subscribe now before you are running out of time ;)

Sunday, July 20, 2008

Excerpt Content with CSS and JavaScript

Sometimes when you have much creative ideas to write on your blog post, you will have long words to tell the readers. So, whenever your visitors landed to the front page of your blog, they need to scroll down a bit more. The consequence is that probably you can only have limited recent posts at the front page.

Excerpt the blog content would be a great idea since, you can expose more recent posts at the front page of your blog. I surfed down a cool tutorial from Rob Glazebrook of CSSnewbie.com that will show you how to hide away extra bits of content using CSS and JavaScript, to be revealed at the click of a button.

Excerpt Content with CSS and JavaScript

Displaying the additional content doesn’t require a refresh or navigation to a new page and all your content is still visible to search engine bots that don’t pay any attention to CSS or JavaScript.

visit the tutorial »
view the demo »

Saturday, July 19, 2008

Stylish Text Effect with CSS Gradient

Today's CSS tutorial review is very famous actually! WebDesignerWall.com brought you a quick tutorial to implement CSS Gradient into text. This CSS trick can be extended into many kinds of gradient text effects. For you who missed the chance to read this following tutorial, this CSS is worth to try!

Stylish Text Effect with CSS Gradient

WebDesignerWall.com put up some answers of why this CSS gradient would be useful for you. Firstly it is because you will need no Javascript or Flash to render these cool effects. Second, in order to save the bandwidth, you will no longer need image file from photoshoped gradient text. Finally, you can pick any web fonts in a consistent scale.

This CSS gradient effect works on most browsers. As IE is an evil for CSS, PNG hack is required in IE6.

visit the tutorial »
view the demo »

Friday, July 18, 2008

Aligning Images Using CSS

Adding text next to your image, is a bit tricky. Sometimes the text won't flow nicely around the image. So you will need to have correct classes to float the image in CSS.

Thord Daniel Hedengren of Devlounge.net wrote a simple tutorial that will show you how to align images using CSS in the right way.

Aligning Images Using CSS

In this tutorial you will also learn how to add the frame class in order to have a nice looking border around your images!

Visit the tutorial »

Wednesday, July 16, 2008

CSS Popup

Today's CSS review is about CSS popups effect. This CSS will make images to appear and disappear on links mouse over. A neat way to drive reader's attention with icons, text or some decorative elements on rollover state.

CSS Popup

The "icon" is an img element inside the actual hyperlinks. To prevent the image from showing up when the page loads, MeyerWeb.com have the following style:
div#links a img {height: 0; width: 0; border-width: 0;}


So how to get the icons to appear? Better read the rest of this tutorial to see the demo page now ;)

Visit the tutorial »

Tuesday, July 15, 2008

Animated Menu using CSS and Mootools

Another CSS tricks from Antonio Lupetti of Woork.blogspot.com. This tutorial will show you how to create animated menu using Mootools. The tutorial is also available in a download file. Inside the download file, you can see the offline demo to check how these CSS and HTML structures of this animated menu works nicely and of course also with the mootools javascript file included.

Animated Menu using CSS and Mootools

Whenever you finish with the HTML codes, all you need is to add a link to mootools framework in the tag of your page using this line of code:

<script type="text/javascript" src="mootools.svn.js"></script>


then add sort of javascript codes in the <head> tag of the page from this tutorial. Customizing the CSS will determine your animated menu design in the final step!

Visit the tutorial »

Monday, July 14, 2008

How to Create CSS Box

;;)I've been so busy lately and being left behind just to write a tutorial or to design another freebies. So, maybe it will be nice if I start to write series of short review about CSS from other websites this week. Hopefully I would be able to bring them to you daily! Subscribe to Graphic Identity Blog to follow the fresh news of CSS tips and tricks today!

CSSgirl.com has written a nice tutorial of how to create rounded corner boxes using CSS and images. There are two kinds of boxes, there are:
  • A flat rounded corner CSS box without effects
  • A box with a drop shadow, border and gradient.

CSS Box

B-) You will need Photoshop or another graphic design software to create those nice CSS boxes. These boxes are so cool because they are also expandable in some heights. Experiment with your own box color and round corner radius! It will be great for a start.

visit the tutorial »
visit the demo »

Tuesday, April 1, 2008

Design Style Tutorial: SIMPLICITY IN WEB 2.0 (Part 2)

Today’s tutorial is a follow up of the previous post: Design Style Tutorial: SIMPLICITY IN WEB 2.0 (Part 1). Mastering CSS may need sometimes and hard work. I’m still learning to improve what I know about it. I began to learn CSS since 4 years back. My favorite designer who has implemented such excellent integration between CSS and her blog is Veerle’s Blog. It was her old short post about CSS vs tables that started me to understand the neat order of CSS. CSS make the designing process easy and quicker to finish. When you need to change something on your layout, you don’t have to work from the start to fix it! That is: CSS… ;)

This tutorial will show you how to use CSS to create rollover image buttons/menus using relative position. There maybe some other ways to create the same rollover effect. I’ve learnt about this from Veerle’s old post about Div thinking cap. I wasn’t realizing of how important this technique for my design until I had a project that required me to create uneven (unordered) menu placement with lots of motive texture as the background.

If you get interested or you even still don’t get me :p , please have a look to the demo webpage. And let’s have fun with this tutorial!

CSS DEMO >>


GETTING READY WITH THE IMAGE ICON

Step 1 – Creating a master background

Create a master background using Photoshop, Be creative as your background design can be part of header, sidebar decoration, search box or any part in your website. My example here is simple :D I just want to show how these random positions of buttons / icons are possible to be done with CSS relative position techniques. The icons that I’ve used for the design are Social networking icons created by FreakGroup.com.ar.
They are very nice icons with smooth gradients FX on each of it. The Facebook and Stumble Upon icons are not included in the download pack; because of it I have designed them with the same style as what in the pack.

CSS background positioning


Step 2 – Cropping

After you finish, save the file both in .JPG and .PSD then duplicate the .PSD as a new file. The next thing to do is to crop the image of button or icon that you wish to have rollover FX on it. After that, merge the layers down.
NOTE: I think .PSD saved format will help a lot if you need any changes to the layout or the icons. So consider to always save the master background in .PSD file as backup.

CSS background positioning


Step 3 – Working with the cropped image icons

You will need to put on a note about the precise image size of your cropped icon. In this case, the size was 92px x 92 px. Create a new file with the exact width (92 px) of icon size but put it doubled for the height, that is 184px. Make sure that you always create a new file with the same image resolution as the first image background.

CSS background positioning

Go back to the cropped icons file and duplicate the background layer. Then drag to the new empty file that you’ve just made. Show the smart guides by entering menu: View > Show > Smart Guides. Place the icons layer on the top of the empty file. The smart guides will show the exact alignment as you can see red thin line appeared if your icon layer edge hit the image border. Duplicate the icon layer to have another same icon image and place the second copied layer to the bottom side. Below is an illustration of the precise layers placement.

CSS background positioning


Step 4 – Adding gradient effect for the rollover icon stage

Work on the bottom icon layer, and create selection using Rectangular Marquee Tool.

CSS background positioning

Go to the menu Select > Feather (Alt + Ctrl + D) and fill the Feather Selection Radius for 3px.

CSS background positioning

Find the Gradient Tool. Set the Default Foreground and Background color or by pressing D key, and put the settings on the menu options just as shown below:

CSS background positioning

Be sure that Dither and Transparency box are checked.
Drag your cursor into the selected area until you get the nice gradient effect as you desire.

The result should be like this:

CSS background positioning

Save the file as .GIF file and do the same with the rest of the icons (begins from the Step 2).

CSS background positioning

NOTE: You can create rollover state effect with your own creativity. If you have unrasterized fonts on your button or icon, you can change the color of the font and styles to differentiate it from default state.



INTEGRATING ICONS TO THE LAYOUT


Step 1 – The master background’s CSS

You will need the master background image that was created on the first step of the previous section. The styles consist of this:


#background-button {
width:500px;
height:500px;
display:block;
background-image: url(..../image/demov1.jpg);
background-repeat: no-repeat;
margin-left:130px;
}



Step 2 – The icon’s CSS

Now it is time to put rollover effect to the icons. The good thing about using this CSS technique is because there is no (loading) delay when people mouse over the icons. The icons image that we’ve created in the previous stage are included both the default and rollover state. Let me show you the CSS to achieve this effect:


#digg ul {
width: 92px;
height:92px;
position: relative;
float:left;
top:13px;
left:125px;
background-image: url(..../image/digg2.gif);
z-index: 150;
list-style-type: none;
}

#digg ul li a {
background: url(..../image/digg2.gif) no-repeat left top;
width: 92px;
height: 92px;
display: block;
text-indent: -9999px;
text-decoration: none;
}

#digg ul li a:hover {
background: url(..../image/digg2.gif) no-repeat left bottom;
}


Presumably you find some problem in I.E. 6, you can add this short CSS hack:


* html # digg ul {
top: 3px; }



Step 3 – The HTML structure

The relative positioning in this CSS technique should be better applied than absolute positioning. Because absolute position would make the icons stays at a certain location even when the window resized.

Veerle explained this on her tutorial Div thinking cap, The left and top coordinates are always in reference with the container it is in. In our example that is the background-button div container since the icons is part of the background-button. This is the HTML structural markup:


<div id="background-button">

<div id="digg">
<ul>
<li>
<a href="http://digg.com/users/kukuhumi/" title="Graphic Identity Digg profile" target="_blank">Graphic Identity Digg profile </a>
</li>
</ul>
</div> 

</div>



Step 4 – Icons to background positioning


#digg ul {
width: 92px;
height:92px;
position: relative;
float:left;
top:13px;
left:125px;
background-image: url(..../image/digg2.gif);
z-index: 150;
list-style-type: none;
}


In order to get the top and left coordinate’s position value just like the Icon’s CSS above; you will need to experiment with numbers. This process is quite alike to a puzzle game actually :D. I suggest that you can start with the range of 100px for both top and left positions and see how it looks on the layout after you save the CSS settings. After that try to decrease or increase the position value for each position. Resave the file and reload or (ctrl + R) your browser to do the position check. Do it for several times and by this time, you should notice how much exactly the numbers of value to be added until you get the nice position of the icon as the master background shows. Sometimes you may go with negative value as well to fit your icons to master background. :D Crafty but it works!
Do the same step 2 and step 3 with the other icons.

Hey I have no idea to make these things whole lots easier, maybe you can suggest me something guys, just feel free to comment if you like! :*


Related Post:

Featured Post

Monster Illustration Vectors that Work

Not all monsters are scary and we can apply them in a design composition or illustration. You may want to search bunch of new created monst...