css

Have a div cling to top of screen if scrolled down past it

I have a div which, when my page is first loaded, is about 100px from the top (it holds some buttons etc. for the page). When a user scrolls past it, I would like the div to "follow" the user in that it attaches to the top of the screen. When the user returns to the top of the page, I want it back in its original position. Visualizati...

Figuring out if overflow:auto would have been triggered on a div

Hi folks, // Major edit, sorry in bed with back pain, screwed up post One of the ad agencies I code for had me set up an alternate scrolling solution because you know how designers hate things that just work but aren't beautiful. The scrolling solution is applied to divs with overflow:hidden and uses jQuery's scrollTo(). It's a set of...

[solved] IE6 PNG-transparency CSS hack not working

I looked around and decided to use a CSS approach rather than rely on JS... I figure the kind of corporate users stuck with IE6 might also have JS disabled by IT departments. So In my HTML I have: <!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....

Is it possible to use 'variables' for css / html element ?

Hi, i would like to make 'skinnable' a web site written in asp.net... I explain: for example, i have a 'div' element, and i would like to define a background-color using a variable, not a fixed value. How can i do ? Css ? Or other tecniques ? Thanks ...

jQuery: Stacking divs and cycling?

Is there any plugin out there that will let me place divs on top of one another and allow me to cycle through them? Something like this: -------------- DIV 2 | -------------- | DIV 1 | | | | | | | | ...

Truncate text if it atempts to run into three lines

I have a small <p> about 140px wide aligned next to a picture. In total there is space for four lines of text. The first two lines are reserved for the title and there are two lines of other info. I want the title to be cut if it spans more than two lines else it will push the other info out of line with the bottom of the image. The on...

How can I remove the border style from a text input on mobile safari?

If I have a normal input element it will show a rounded border with what appears to be an inset shadow. Any ideas how I can remove this shadow? ...

My javascript drop down navigation menu displays behind content in internet explorer 7

OK, so I'm working on a redesign and we've got most of our cross-browser CSS compatibility bugs worked out - except for a glaring one with ie7. The issue is that we are using a JavaScript for a navigational menu drop down. In all browsers except the noted culprit everything functions as expected. However, in IE7 I'm getting the drop d...

Burnt edges for a div using CSS3?

Is there a way I can get a non-conventional shape to a div like that of burnt sides or something similar using CSS3? ...

Best way to layout in HTML forms?

I want to display an HTML form containing labelled text fields, like this: First Name: [_____________] Last Name: [_____________] Date of Birth: [________] My obvious approach is to use a <TABLE> and simply place the labels and text fields in its cells, but is there a better way, e.g. a CSS-based approach? EDIT:...

Balanced text wrapping in HTML

In HTML, is there a way to evenly distribute text that is broken across multiple lines? E.g., I don't want: Here is some really long label that ends up on two lines. I'd prefer: Here is some really long label that ends up on two lines. ...

Selections and radioing - JavaScript

I have a list like this: <ul> <li id="adm-thumb" onclick="javascript:addBanner('bowling.jpg');"> <div class="adm-tick"></div> <img src="img/banners/bowling.jpg" /></li> <li id="adm-thumb" onclick="javascript:addBanner('kcc.jpg');"> <div class="adm-tick"></div> <img src="img/banners/kcc.jpg" /></li> ...

CSS: Freeze table header and first column, *but only on certain axes*

Hello all, I have a variation on a common question, and I'll try to explain it as best I can. It may take some visualization on your part. I have an HTML table (in reality there are tables within tables within divs within tables -- I'm using the JSGantt plugin). I'd like for the table header to be frozen only when I scroll down on the y...

why do people still use tables, inline css, et al?

When you learn HTML and so forth nowadays, the mantra is always "Clean code = better code". So why do sites like Mobile Me and Google and Facebook all use huge amounts of tables and other not-semantically correct code? Thanks! ...

Add jquery link to returned text...

Hi all I am trying to add two jquery plugins files to my application. When a user triggers my ajax event, the server will return text with a form button. The plugins (a jquery calendar) will work when the user clicks the form button inside the returned text . I believe I have to add the link inside the return text instead of the main p...

box-sizing support in ie7

I just discovered the "box-sizing: border-box" css property which solves a bunch of cross browser layout problems for me. The only issue I now have is that ie7 doesn't seem to support it. Is there a hack to get ie7 to support it? ...

Do you use microformats in your web projects?

Do you use microformats in your web projects? If yes then why? If no then why? If yes then for which things do you use? Is there any alternate of microformats in HTML 5 ? I haven't used microformats yet. Should i start to use now or not much need? ...

Why does Internet Explorer break "pegman" display in Google Maps API v3?

On my site here, the SteetView control, aka "Pegman", works great under Firefox. Under IE (7 in this case, but tested on 8 as well - same result) it breaks the display of the pegman control. Here's my map code: var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; directionsDisplay = new google.m...

HELP! How can I display one style in Safari and a different style in Chrome?

My client is starting to get antsy....so any help would be greatly appreciated. I am having issues with my secondary page header images shifting. It is displaying correctly in Firefox, I haven't been able to check in IE yet w/out access to a PC. It was displaying correctly in Chrome, but shifting in Safari. I added the "webkit hack" ...

css table column width not set

Hello, I'm trying to set the width of table column to a minimum value. The header row (th) was set white-space:nowrap to prevent wrapping. Now all the columns (including td rows) set to a width that of th. I tried to expand the size of smaller columns by setting it in the html as <th style="width:200px;"> and <td style="width:200px;">...