css

Best way to create a resuable <table> style

I'm creating a lot of different tables (db-driven) across a number of different pages where I'd like to impose a consistent styling: First and Last Row: bold font - reversed foreground/background All other rows zebra striped. Basically just implementing 'header/footer' rows and zebra striped data rows. I've seen some jQuery examples an...

Background Images CSS & Text

I want to update my site having text in the front and using background images in the back of my webpages (I want to do this for SEO optimization), what is the best html/css way to do this? The current way I am doing this is not rendering correctly in IE8, but IS rendering properly in Firefox: (Try this link in both IE8 and in Firefox) ...

How do I make a certain text style larger?

I wrote up a post in WordPress that included some code samples. I used the "preformatted" style for the code sample, which gives a nice monospace font and doesn't screw up multiple spaces, and everything looks great... ...except that it's tiny! The text of the code samples comes out at something ridiculously small, like 8 pt or someth...

CSS: A way to maintain aspect ratio when resizing a DIV?

I want to resize a DIV container as the window width changes via % width. Are there any new CSS3 rules that would allow the height to change according to the change of width, maintaining the original aspect ratio? I know I can do this via javascript, I would just rather not if I don't have to. EDIT: To better explain what I'm trying t...

HTML DIVs not properly displaying

I have what I think is a reasonably simple HTML format to display some financial information. For some reason, jQuery (and, indeed, Firebug!) don't seem to update the visual display of the parent divs. This is a lot easier to see if you look at this in a browser. I'm using the Bluetrip CSS framework. Here's the HTML: <!DOCTYPE html PU...

Is it better to use the link tag or the style tag to import CSS?

Or is it just a personal preference thing? What I'm getting at is, is there a specific benefit to using either method? <link href="main.css" rel="stylesheet" type="text/css"> versus <style type="text/css"> @import url('main.css'); </style> ...

Background and CSS Floats

So I am using the 960 grid system and found a few things that they don't support. I've considered switching to Blueprint, but I've got to come back to the design a bit later in the process. Anyway, I've simplified my code to show what I'm experiencing: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/T...

In CSS, can I add text of a different style before or after other text?

For example, if the following is part of an HTML file: <span>foo</span> can I somehow add " bar" after it in italics with the .after and .before pseudo-selectors in CSS so that it would say "foo bar"? ...

Php - Looping For Different CSS

MySQL $selectSize = "SELECT * FROM products"; $querySize = $db->select($selectSize); while ($product = $db->fetcharray($querySize)) { HTML <ul> <li>Product A</li> <li>Product B</li> <li class='right'>Product C</li> <li>Product D</li> <li>Product E</li> <li class='right'>Product F</li> </ul> Question While getting the prod...

CSS: displaying one particular icon from an image file

How does one set the CSS background-image property to just load one particular icon from a larger image? For example, jQuery UI themes its Dialog widget using the following PNG image file: http://dev.jqueryui.com/browser/trunk/themes/base/images/ui-icons_2e83ff_256x240.png, which encodes a bunch of icons in it. Then, as demoed in http:/...

Is there anyway to expand image on hover like bing image search???

I have a search result which includes images. When the user hover over the image, the image should expand like we see in bing http://www.bing.com/images/search?q=world&amp;go=&amp;form=QBIR&amp;qs=n . Please help. ...

Get values from original css file using jQuery

Hi all, I am running in to this situation. Basically my site has many templates of css and users can change the color dynamically using jQuery. Now, the way I did it was to use jQuery to modify the css property directly by selecting the classes. However, if users switch to a different template (also dynamically), I insert .css file in ...

Set the width 100% of the tag "legend" in FF

Is it possible to set the width of the tag "legend" at 100% in FF? In spite of all my efforts its length stays equal to the containing text. ...

pros/cons on using grid css framework

I am looking forward to pros/cons on using 960 grid css framework. When using grid css framework I feel that I am back to the old days using table to do all the layouts. Because everything is defined as classes <div class="grid_3 prefix_10">. And this seems to me is mixing the layout with html. If you look at csszengarden I really don’t ...

Font-Size for Button and Link

I try simple html: TEST FONT SIZE</br> <input type="button" value="test bytton" style="font-size:20px"> <a style="font-size:20px">test link</a> and found out that font-size of button looks like bigger then font-size of link in spite of style. Does anybody know why style works differently for link and for button. And how to make them l...

Converting a button to a hyperlink

I have a button i want to convert the button into a hyper link, it works fine in Mozilla but in Internet Explorer it presses down as a button a click takes place ... so please help .... Input.Button-Link, input.Button-Link:active { border: 0px; behavior: url("cssHover.htc"); padding: 0px; width: auto;...

a:hover background replacement on a empty a tag not working

Hi, Im using hyperlinks as a image, well a background image so that I can do a image swap eaisly with a:hover. I have the following: <a class="cross" href='#'></a> And the following css a.cross { background:transparent url(/images/cross-grey.png) no-repeat scroll 0 0; float: right; border: none; width: 19px; heig...

CSS Menu Under Flash Slideshow

I've tried using wmode transparent codes on my SWF slideshow but the menus still seem to appear behind the Flash in IE8 and Firefox 3.5... In IE7 it works although the looks of the menus aren't as good. Here's the Flash code: AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,...

Lowering z-index causes descendant elements to become unclickable

I have a (CSS) stacking question. The tab-boxes on my development site below have z-index set as -1 so that their border appears behind the tabs above them, so that the active tab's white bottom border covers it. But on all browsers but Opera this makes descendants of the tab-boxes (links, forms, etc.) unclickable. You can see this at: ...

HTML/CSS: Table cell with image rendered too large in IE

I have the following simple table to reproduce the issue: <TABLE> <TR> <TD style="border: black solid 1px; width:24px; height:68px; margin:0px; padding:0px" > <IMG style="width: 24px; height: 68px; margin:0px; padding:0px; border:none" src="Image24x68.png"> </TD> </TR> </TABLE> The image is actually 24x8...