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

IE6 and Ubertcart

There's a problem with Ubercart and any modules that use a great quantity of CSS files in Drupal. It doesnt seem to work in IE (any version).

Sympthoms
You install Ubercart or any other big module in Drupal. you test it and seems fine in all the browsers , except IE (again, any version). Seems like some CSS files are missing.


WTF happened to my CSS! yelling is another sympthom of this IE induced disease

Cause:
IE6 was created to support only 31 stylesheets if you use the link tag to insert them. So when you install ubercart, theres a big possibility that youre excedding that nonsense limit. Have a good day with that.

Remedy:
There are two ways to work this in Drupal without feelin like youre kicked in the nuts with an iron spiked shoe:
  • Im too young to die way (Easy Way): Just use unlimited css module, install it an forget about it. This module will call all the CSS files via an @import rule , you can have more thant 31 @import rules in IE, that why it work. Just as a side note, as a good web developer youre not supposed to use the @import rule because its mean trouble.
  • Hurt me plenty way (Medium Way): Activate the Css File Optimizer in Drupal. Go to admin/settings/performance and you will find the option Optimize the Css Files (duh!). This will mix all the css files in your web page to just one file. I couldnt make it work in my server, this option need a beefy machine to run so make sure you have a really reaaaaally fresh backup of your site before activating this.
You can also activate the Optimize the Javascript Code option, jsut remember to make a backup

So at least in Drupal there are ways to deal with it. Hey dont blame IE for teaching you about web server performance and making you lost 4 hours of your life yelling like a crazy schoolgirl before a Jonas Brothers concert.

Hate the Computers Gnomes, yeah thoses little rascals causing trouble again.




Custom Css Tips for Jquery Tabs

I love Jquery Tabs , it just make your life easier... well, only when you use his custom CSS.

But how about integrating it with your custom CSS, instead of his restrictive-gun-in-head Themes? , of course we know how to create a Tab Menu in CSS, but integrate it with Jquery Tabs is not so easy. So after one day of debugging my own code i will give you some tips to create your custom css for jquery tabs.

Tip 1: Know the classes for the Navigation Tab Bar: There is only one class that you will need to know little grasshoper:
  • ui-state-active: As the name implied, this class is added to the tab that is currently selected, dont mind the other classses, you will not need them, this is the silver bullet class for jquery tabs.
So we will need 4 css for know
  1. The Default Navigation Bar Css
  2. The Css for the a tag inside tha navbar
  3. The Css of the ui-state-active bar
  4. And the a tag inside the active navbar

So the css for this navigation bar(1) will go like this:


ul.grindyMenu li{
background:white;
color:#D09984;
display:inline;
list-style:none;
padding:1px 15px 1px 15px;
}


Then we add the a tag css(2)


ul.grindyMenu a{
text-decoration:none;
font-size:0.7em;
font-weight:bolder;
}



And for the active tab css(3), it will be like this :


ul.grindyMenu li.ui-state-active{
background:#D09984;
}


Finally the a tag inside the active tab (4):


ul.grindyMenu li.ui-state-active a{
color:white;
}


Now there is a small catch, your css file should have those rules written in that order. Maybe here you will not need to follow that tip, but what if you need to create a rule for the ui-state-default class. Do you notice how the active and not active tabs, both have the ui-state-default class? If you declare ui-state-default after ui-sate-active, it will override it:


So make your life easier and put those rules in order, first the default class, and then the active class in your css file.

Tip 2: Know the classes for the Panels, here also we wil only need one class:
  • ui-tabs.hide: This is the most important class, this class make the non active panels to hide


.ui-tabs-hide{
display:none;
}

And that's it. Put this class and everything will be allright. Happy coding!

PostgreSQL.org Website Design Contest

Yup my favorite database is making a contest to redesign his Website. Of course im givin' it a try so you will see me with one of my design there. This is the first time I go to a contest like this but i will make my best there.

Of course there's a 2000$ prize that make me like much more Postgres, but the initial love is there. The price is divided between 1000$ for the winner Design and 1000$ for makin that Design go online.

My strategy is to create the CSS without hacks, and then use some jquery to make it web 2.0

So if youre a Web Designer you can go ahead and make your best.

Double Border Stuff - Playing with CSS

Yesterday i was in a hurry to create some fast CSS, so a copy&paste frenzy just came in, and i discovered a maybe usefull way for putting double border. Lets look at it more carefully:

Imagine you have a div:


Hi Im unique



Now lets put some css to make it pretty


div#Unique{
background:#0033CC;
border:10px outset #ccc;
color:white;
}


Ok, maybe not sooo pretty,anyway we will have something like this:

Hi Im unique



What if we put some more border options in here, something like:


div#Unique{
background:#0033CC;
border:10px outset #ccc
border-top:15px double outset #ccc;
border-bottom:15px double #ccc;
color:white;
}


Walla!!!. Our DIV get a makeover and finish like this:

Hi Im hell more unique :P


Notice that here this:


div#Unique{
border:red;
}

is equal to say:


div#Unique{
border-left:red;
border-right:red;
border-top:red;
border-bottom:red;
}


So is nothing new but you can create a beatifull effect using only pure CSS.

Better yet i was testing it and its seems like it work on Firefox 3, Opera 9.5 and believe it or not in IE 6.0!!!. That just some kick-ass CSS!!!. Well not really but it may be helfull. See ya next deculture ^^