css

Setting styles through code on html elements. Is there better way?

I came across some code like this: public string IsAdmin() { string style = ""; if(EditUserName == "") { style = "visibility:hidden;display:none"; } return style; } Then in the html, I see something like this: <table style='<%= IsAdmin() %>'> </table> The above doesn't seem the best way to do this. I...

CSS: Two-element "table" aligned nicely

Hi This is a somewhat open-ended question, but I really want to understand this one so I don't care. I have a two-element "table" (CSS with spans). The left column always has an icon which is 20x20 pixels. The second column has a single line of text associated with the icon. I have gone through all sorts of ideas I could come up with ...

Table doesn't display borders

The following code should display table with borders around cells, but it doesn’t. Any idea why? <head> <meta http-equiv=“content-type” content=“text/html; charset=ISO-8859-1” /> <style type=“text/css”> td, th {border: 1px solid black;} </style> <title>Testing Tony’s Travels</title> </head> <body> <table> <tr> <th>City...

Getting elements in the order they appear in the document

I have a document and want to extract a couple of elements which ar direct descendents of the parent element but leave out others. The problem is that I don't get the elements in the order they appear in the document. The reason might actually be that the CSS selector I am using is wrong... require 'rubygems' require 'nokogiri' require ...

Form Input Won't Take Percentage Padding

My form inputs display properly if pixel padding is used, but using a percentage padding for left and right breaks it. I can't figure out why. Demo @ http://stonewatercove.com/test.html It works in Safari, broken in Firefox 3.5.3 OSX. The problem is that when I use a percentage padding, the padding all breaks (hence why the input value...

Converting an HTML Document to Selector based index file

I'm looking for some sort of tool that can take an html document and pump out a selector based representation of the file. For example: <div> Some text <ul class="foo"> <li>First</li> <li>Second</li> <ul> </div> And output a flat text file in the spirit of: div div #text Some text div ul.foo li Frist div ul.foo li Se...

How to make a div appear higher on the page in front the content higher in the flow?

It's a pretty basic design question, but still: I have a header in one file and a few pages which load in succession in other files. I want to add a progress indicator (just an image of a 1/3, 2/3 and 3/3 filled bar) to each of these pages, but I want the bar appear on header, which is in different file and higher in flow, so negative m...

menu items 100% in IE6, help

Hi I'm having IE6 issues (surprise surprise). I can't work out why the menu items are all 100% wide: http://www.baytobush.com.au/dev Can anyone shed light on this? must be something is my css... ...

Ensuring Updated CSS/JavaScript on Client Side

I'm trying to ensure that visitors of my ASP.NET MVC website always have the most-current CSS and Javascript (and not some older cached version). I tried to realize this by generating a seed value when the application domain starts, and automatically append it to the CSS and Javascript URLs (so now instead of /Content/All.js the link is...

IE 6 Bug: float: none -> borders disappear

Hi, i have a class let's call it cell, .cms-block .cell{ width:520px; float:left;} .cms-block.wide .cell{width: auto; float:none} in IE 6, the child elements of .cms-block.wide .cell loose their borders/background colors. if I take away the float:none; the borders are there. but... the cell is floating left. argh. I looked around an...

Styling jQuery ThickBox (round corners)

Hello, I'm using jQuery ThickBox plugin (http://jquery.com/demo/thickbox/). I have been concentrating on functionality so far and I have got it working exactly the way I want. What I want to do now is to style the box so it has round corners. To make it more difficult, I would like the round corners to be transparent, so the background...

Sticky Footer help!

I am trying to make a sticky footer for my web page, I found some CSS that does keep the footer at the bottom but has a few downsides. 1, If you keep scrolling down the page the page just gets bigger and bigger (that was completely unexpected, no idea what caused that). 2 it moves down with the page in a jerky action, like stop..go..stop...

How to figure out which lines of css is not actually affecting anything again?

I changed the html multiple times,but without deleting the related css specification. And now there are quite some useless css there. Is there an efficient solution to grep all them? ...

Table row height behavior in IE vs Firefox/Chrome/Safari

Consider the following simple html page markup: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title></title> <style type="text/css"> body, html { height: 100%; ...

Select Box And Checkbox Replacement

I'm looking for a sensible way how to style select boxes, checkboxes and/or radiobuttons with CSS. I know that you can't do it with plain CSS because of how browsers' rendering engines work. But are there any javascript ways to style these HTML elements? And do they work across major browsers? ...

How to link a header in a standards-compliant way?

I have a block of HTML that looks like this: <div id="header"> <h1>title</h1> <h2>subtitle</h2> </div> I'm using a CSS technique to hide all that text and replace it with an image. But I want to link the whole block to the homepage. I can't wrap it in <a> because that wouldn't be standards-compliant. So how do I do it? My solutio...

DIV issue between firefox & chrome

Hello all, I'm still relatively new to CSS, but after lots of Stack Overflow reading, I have figured out how to add "headers" to a panel. Yay, go me. But the problem I'm running into is that one of my panels in particular won't render properly in Firefox. I've been doing all development work in Chrome, and I just now noticed this issue....

Online text editor

I am looking for an simple online text editor that will load an online file (CSS) and allow a user to make changes then save the file to their desktop. Syntax highlighting would be nice, but not necessary. I found Edit Pad which would be ideal, except I need to be able to load the content into it. Most of the users I help need step-by-s...

div containing jquery progress bar inside <ul> list

Hello, I am trying to add a jquery progress bar inside a ul li tag. <ul> <li> <a href="test">test</a> <div id="progressbar"></div> </li> </ul> I use display: block for the anchor tag and I tried the same for the div tag but with no luck. The div elements displays below the anchor tag. I would like the progress bar to be o...

latest updates for CSS and jQuery?

From where I can get latest updates for CSS and jQuery regularly? i.e. some feeds etc etc... baljit ...