css

Gradient fill using jQuery?

I've got a <div> that needs a gradient background. However, the size of the div is variable, which lands me back in "can't do gradients in CSS" land. However, I'm pretty sure this is possible in jQuery, I just can't seem to find a decent example. Does anyone have something they can point my way? Thanks. ...

Designing pages with CSS disabled

I'm currently designing a site which uses a dark background, and just out of interest, I disabled CSS and took a look at it. Because it's been marked up semantically, without styles it's still a coherent document, except for the fact that my heading images are white, and because the default background colour is also white, you can't see ...

Any alternative to blockUI for jQuery?

Hello, The question says it all! I am looking for an easy to use alternative of blockUI for jQuery. I've been trying for days to center a dialog box with blockUI in both FireFox and IE but no chance. It doesn't work. I looked at this question about centering a blockUI dialog box (http://stackoverflow.com/questions/294502/how-can-i-get-a...

CSS floats and block elements

I have an annoying CSS layout problem. I'm trying to float images on a particular page: img { float: left; } I think make sure my headings don't start indented with: h3 { clear: left; } It all works fine except for some of the images that have lists (or any block element) floating past them (or not as the case is). The reason...

How to make dropdown menu like "delicious" and "google" ?

Hi, I want to make a dropdown menu like delicious has at this http://delicious.com/search?context=all&amp;p=sql&amp;lc=1 page. In this page click the arrow which is with "Search" button. On click it displays a drop down menu, I want the same menu style but on my page I am having a link, what I want with that link a simple small icon wil...

CSS problem between Visual Studio IDE and IIS

Hi I'm not a web developer, so what seems weird to me is hopefully an easy one. Have an existing ASP.NET web site which I need to modify, using VS 2008. I worked on an aspx page and somehow the CSS settings changed and messed the page up badly. I restored the old CSS files and now the page is fine again in the IDE but still a mess wh...

CSS problem with relative sizes

I have this code <html> <head> <style type="text/css"> .frame {width: 50em; border: 1px solid black} .frame label {width: 20em; display: block; text-align:right; border: 1px solid green} .frame label span {width: 20em; display: block; font-size: .5em; border: 1px solid red; text-align: righ...

Best non-WYSIWYG CSS Editor?

I'm looking for a powerful CSS text editor. I have no need for WYSIWYG capabilities. Right now I'm using Vim, Aptana, and Visual Studio 2008 depending on the project, but I'm wondering if there are better solutions. Free is better. I want all the obvious features: auto-completion syntax highlighting tab/space options A few les...

How to achieve two different alignments inside a html option tag?

I have a select html tag with country calling codes. <select name="countryCallingCode" id="countryCallingCode"> <option value="1"><span class="name">Afghanistan</span><span class="code">+93</span></option> <option value="2"><span class="name">Albania</span><span class="code">+355</span></option> <option value="3"><span class=...

How to render text in .NET in the same size as browsers does given CSS for the text.

I am trying to create a "save webpage as bitmap"-function on a website and i have some problems rendering the text in the correct size on the server side. The fontsize settings for the text on the client is: .textDiv { font-family: Verdana; font-size:16px; } If i try to render this on the server with float emSize = 16; g.Dra...

Padding-background/text filler in CSS?

I'd like to create a table that looks like this: lolvalue---------|lol date|some other column data 1 lolvalue12345|lol date 2|some other column data2 in CSS/HTML. Basically, there is "data" and there is a filler that goes to the right, but doesn't count as data, so it doesn't stretch the column, filling the space stretched by the ...

Javascript: How can I undo the setting of element.style?

I have an element in my document that has a background color and image set through a regular CSS rule. When a certain event happens, I want to animate that item, highlighting it (i'm using Scriptaculous, but this question applies to any framework that'll do the same). new Effect.Highlight(elHighlight, { startcolor: '#ffff99', endcolor:...

HTML/CSS: what's a better option for layout of a tree of nested elements than nested tables?

Ok, I have a set of checkboxes for selecting criteria. For argument's sake, we'll say the data looks like this: [] Vehicles [] Unpowered [] Bicycle [] Skateboard [] Powered [] Two-wheeled [] Motorcycle [] Scooter [] Four-wheeled etc The []s represent checkboxes. Ignoring the obviously ...

CSS 100% height with padding/margin

This has been driving me crazy for a couple of days now, but in reality it's a problem that I've hit off and on for the last few years: With HTML/CSS how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins? By "proper" I mean that if my parent element is 200px ...

CSS Pseudo-classes with jQuery

Hi, I've just learnt a bit jQuery, and am trying to use it for a simple color-changing effect. Let's say I have two <div>s, #foo and #bar. #foo has a lot of URLs, and has the following CSS defined: #foo a {color: blue; border-bottom: 1px dashed blue} #foo a:hover {color: black; border-bottom: 1px solid black} now I would like to cha...

UL list style not applying

I've got a stylesheet that will not, for whatever reason, apply list-style-type to a UL element. I'm using YUI's Grid CSS with their reset-fonts-grid.css file, which I know strips that out as part of the CSS reset. After calling YUI, I call the stylesheet for the website and in there have a block for UL: ul {list-style-type: disc;} I...

CSS margin-bottom collapsed - but why?

Hello, I have this simple xhtml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;"> <head> </head> <body style="height: 100%;"> <div style="height: 100%; overflow: a...

Dividing long list of <li> tags into columns?

I've got a list of about 30 <li> in a <ul>. Is there any way, using CSS, to divide these into three columns of ten? ...

Any way to prevent "deselection" of highlighted text?

Highlight some text on this webpage, then click basically anywhere on the document. Your selection will disappear. Is there a way to prevent this behavior when the user clicks on a specific element, either by CSS or Javascript? E.g.: var element = document.getElementById("foo"); foo.onclick = function(e){ //some magic here that pr...

X is to CSS what GWT is to Javascript; what is X?

Is there a structured language for declaring styles in a sensible way, which can then be rendered into browser specific css files, similar to what GWT does to Javascript? It would ideally be a language that supports variables, deals with browser quirks and differences (e.g. filter:alpha vs opacity), provides an intuitive syntax for comm...