css

How do I constrain the size of a tooltip/popup-style DIV so that it doesn't trigger scrollbars on the page

The mouse hovers over an element and a tip appears. The tip overflows the page, triggering a scrollbar, which changes the layout just enough so that the underlying element that triggered the tip is no longer under the mouse pointer, so the tip goes away. The tip goes away, so the scrollbar goes away, and now the mouse is again over th...

How do I use jQuery to insert a <DIV> wrapped around a variable number of child elements?

I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol> <li> <label>Some label</label> <one or more form controls, ASP.Net controls, labels, etc.> </li> <li> <label>Another label</label> <... more of the same...> </li> ... </ol> I'm trying to keep my markup as ...

Which method of 'clearfix' is best?

I have the age old problem of a div wrapping a 2 column layout. My sidebar is floated so my container div fails to wrap the content & sidebar. <div id="container"> <div id="content"> </div> <div id="sidebar"> </div> </div> There seem to be numerous methods of fixing the clear bug in FF: <br clear="all"/> overflow:auto overflo...

When to use custom html tags?

What is the use case for using your own html tags? (In standard off the shelf browsers) A colleague and myself were discussing it lately. I could not think of a use case. We discussed it could be used for styling with css but then decided to use the span tag with a class instead. Thanks Paul ...

Safari/WebKit table over-run when using whitespace: nowrap

Having a strange rendering issue with Safari: I have a table inside a div. Inside the table <td> I have lots of div's floated left. So the normal display is all of the divs within the td stacked up to the left until they fill the width, then flow to the next line, and so forth. So something like this: |===========================| | ...

Best tool for CSS?

Hi, What is the best free tool for CSS design? Cheers, Srinivas ...

Is it possible to get the position of div within the browser viewport? Not within the document. Within the window.

Is this doable in either IE7 or Firefox? ...

Resetting height of an HTML element via CSS

I use a custom-built asp.net control that renders to a DIV and has "height='0'" hard-coded into the element (I know.. stupid). But I need to reset it - get rid of the height assignment somehow. Is this doable with CSS? I can set the height to 100px for example, and it works. But that's not what I want - I want the height assignment r...

How does CSS clearing really work?

I have a <div> that I want to be on a line by itself. According to W3Schools, this rule: div.foo { clear: both; } ...should mean this: "No floating elements allowed on either the left or the right side." However, if I float two <div> elements left, and apply the rule above to the first one, the second one does not budge. On the...

How do you specify font sizes in CSS so that they match mockups and allow resizing?

We're running into issues with how we specify font sizes. If we specify the font sizes using pt, they don't always look the same across browsers/platforms. If we specify font sizes using px, IE6 users can't resize the text. ...

Change of class does not result in the new class's rules being applied in IE6??

I have a single image with 9 different states and the appropriate background-position rules set up as classes to show the different states. I can't use the :hover pseudo-selector because the background image being changed is not the same element that is being hovered over. I have defined the classes this way: #chooser_nav {width:580px; ...

Is it possible to have a bottom footer with a horizontal scrollbar and no vertical scroll bar?

I have a layout which uses min-width and works great. So I came to add a footer which I want to stick to the bottom. Firefox will display everything perfectly while with IE, when min-width takes in effect and the vertical scroll bar kicks in, the horizontal scroll bar also appears even thought my content isn't even close to needing it. ...

In-line CSS IE hack

Is it possible to create, for instance, a box model hack while using in-line CSS? For example: <div id="blah" style="padding: 5px; margin: 5px; width: 30px; /*IE5-6 Equivalent here*/"> Thanks! ...

If your slightly strange CSS code works on all browsers on Windows, will it work on Mac and Linux?

I am testing some weird-looking CSS code that I wrote (I'm using a mix of percentages and pixel values for width of DIVs, basically). While I'm not convinced that it's right, it works perfectly on all screen sizes on IE 5.5, IE 6.0 (thanks to these guys!), IE 7.0, Firefox 3.0 and Safari 3.12... all on Windows XP. Do I need to further wor...

Embedded Slideshow/Image Viewer?

I've run across this sort of thing on multiple websites and was wondering what it was called, does anyone know? Here's a screenshot. ...

Bizarre IE CSS Problem.

So my problem has to do with a Sticky footer that works, but a rounded corner script pushes the footer up a bit in IE7. (example: Games Page) If you load the page in IE7, the footer is in the wrong place, but if you do the following: 1. Open a new tab 2. Go to google.ca in the new tab (or do something) 3. Close the tab The footer problem...

Keep resizing text from pushing the other elements in its container around?

I have the following html <div id="menu"> <ul class="horizMenu"> <li id="active"><a href="#" id="current">About</a></li> <li><a href="#">Archive</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Item four</a></li> <li><a href="#">Item five</a></li> </ul> </div> and in th...

Resetting visited status on links

Is there any way you can reset the visited status on links? The scenario is this: On an intranet-site which naturally has a lot of links we want a link to have the status of "visited" for a set period of time only. I am therefore looking for a way to manipulate the visited status of links. Is this doable? It should be cross-browser of ...

How to apply CSS to iFrame?

Hi, I have simple page that has some iFrame sections (to display RSS links), how can I apply the same CSS format for the main page to the page displayed in the iFrame? Thanks, ...

How can I line up my bullet images with my <li> content?

Heres a screenshot to make it clear. I'm trying to figure out a robust way of making the bullet images vertically aligned to my li content. As you can see my content is currently too high. Many thanks 'over-flowers'... http://dl.getdropbox.com/u/240752/list-example.gif ...