css

CSS Selectors

What is the difference between these two CSS statements: h1 em { color:#ddd; } and h1 > em { color:#ddd; } As far as I can tell they do exactly the same thing (though according to what I've read at W3C in the first case em is considered a 'descendant' where as in the second it is considered a 'child', though I have no idea how tha...

Implementing columns in HTML/CSS

I have a bunch of DIVs that contain textual information. They're all the same width (maybe 400px or so), but different heights. For space reasons, I'd like to have two or three columns of these DIVs (sort of like a want-ad section in a newspaper). See attractive ascii-art below :) DIV1 DIV3 DIV1 DIV3 DIV1 DIV1 DIV4...

Is there a cross browser way to expand text on click via css?

First, here is what I would like to do: Row 1 Row 2 Row 3 I have code setup so that when I hover over row1, 2 or 3, the row gets highlighted. This is done via css. I would like to be able to (for instance) click row1 and then it would look like this: Row 1 Some text here Row 2 Row 3 That text would stay there until I clicked on...

Firefox 3 syntax error with external css

I get a strange syntax error in Firefox 3.0.10/Leopard when using the following html/css: foo.html: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html lang="en"> <head> <link rel="stylesheet" href="foo.css"/> </head> <body> Foo </body> </html> foo.css: div { color:...

Div Moving in cycle rotation using Javascript

Is it possible to rotate a Div in cyclic rotation using javascript. I have four DIVs in an HTML page. I need to rotate those DIVs in a cyclic rotation. If it's possible tell me now. It is urgent. Thanks & Regards Ravi Kumar ...

Cross browser way to hide selection display

I am making a browser based javascript game. As such, within the game there is nowhere users need to copy/paste text. However there are many places where the user needs to click and drag to make selections in the game. Within the game there are many cells, internally just normal table cells, with a non breaking space to stop them collap...

Degradable HTML layout for comparing two images

How to create web page for comparing two images, preferably using only (X)HTML and CSS, without JavaScript and DHTML / AJAX? The simplest solution would be to put two images side by side together, either touching or almost touching and centered both, or each centered in its own half of page. The problem in robust solution is with degrad...

Django templates: Group items in Threes

Hi here guys. I have an odd problem with Django. I have a set of objects that Im looping through in a template as you would normally. However, I need to group the items in threes. The layout of the page goes like this: Painting 1 - Painting 2 - Painting 3 D E S C R I P T I O N 1 D E S C R I P T I O N 2 D E S C ...

CSS & Javascript rollup file(s)

The Yahoo User Interface library offers rollup support if you use their CDN. I'm using Zend Framework 1.8.0 and was wondering whats he best way to go about replicating this so as all our css or javascript files can be rolledup into one tag - thus one http request. I am using the standard MVC components with a .htaccess file that rewri...

Empty blank space at bottom of page?

Hey! In my current simple project, Copybin, there is some space at the bottom of the page that I cannot seem to be able to remove it. Any ideas? ...

jQuery Morph Classes

Im not sure if the title is what im trying to describe but ill have a go. I have two classes "big_green" and "small_blue" big_green = 100x100 green box small_blue = 50x50 blue box i remember there used to be a js library that allowed you to tween classes, i think it was mootools. Anyway, is there any way in jQuery to animate the cha...

css: how to format contact entry screen

I am trying to nicely format contact screen in my aspx page using CSS. With the following code, I am unable to click into the txtEmailAddress. If I take out padding:100px from the txtSubject Span element, then I am able to click into txtEmailaddress and edit. please help... <div> <span> Your Email Address : </span> <span style="padd...

Why are formatting characters like CRLF being rendered by certain browsers as whitespace?

I need someone to explain to me where this extra padding is coming from on divs that contain img elements. You can go to http://www.dev12.com/CSSTest for live examples of my two problems. Problem #1: Safari, Firefox and Opera render roughly 6 pixels of unwanted bottom padding on the container div. It does not matter if I explicitly se...

How to assign class to Columns ...

I have like 100 rows, but I dont want to assign the class abc1,abc2,abc3,abc4 individually... Is is possible to automatically assign the class to TD depending upont the column no i.e Column1 -- abc1 Column2 -- abc2 ..etc <Table> <tr class="odd"> <td class="abc1"> ...</td> <td class="abc2"> ...</td> <td class="abc3"> ...</td...

mouseover() mouseout() jQuery add/removeClass problem

I am trying to create a simple mouseover effect using a combination of mouseover, mouseout, addClass, and removeClass. Basically, when the user mouses over an element, I want to apply a different border (1px dashed gray). The initial state is "1px solid white". I have a class called "highlight" which simply has "border: 1px dashed gra...

Extending sidebar down page

Hey all, I am trying to get my right sidebar to fill to extend the full length of the content within my #wrapper on this site: http://www.starmedianetwork.com/ I put a red border around it to try to see where my #right is on my page. I have tried working with: height:100% on that #right and others. Also searched on google about clear ...

ASP.Net MVC Page Styling

I've got a css file that i want to use to style my ASP.Net MVC web application. I've included it in the solution however it doesn't seem to be taking any effect. Have I missed something? ...

How Dynamically Resized a DIV element's Width to Fit its Text Content?

Let say I have this HTML code snippet: <div id="container"> <div id="textContent">Text Content Te</div> <div id="anotherText">Another Text Content</div> </div> I wonder how could I dynamically resized the div 'textContent' width so that its width fit its text content nicely (neither the text will be wrapping nor scrolling nor trunca...

CSS Background Image for navigation bar does not appear

Basically, I want to make a navigation bar where the current or active tab of the navbar will have a background image of a rounded tab. But, that image doesn't seem to appear. I placed the image at the '#navbar .active a' portion of the CSS code below: <html> <head> <style type="text/css"> #menubar { width: 800px; height: 40px;...

Is it possible to use string macros in CSS?

There is a portion of my website where I am using a country's flag as an icon for a list element. For instance, I have: <ul> <li id="at">Austria</li> <li id="de">Germany</li> </ul> The accompanying CSS looks like this: #at { list-style-image: url('at.png'); } #de { list-style-image: url('de.png'); } Is it possible to repla...