css

Internet explorer creates horizontal scrollbar for vertical scrollbar's width

A div, containing a table has the following CSS styling: #formulaAlts{ float: right; height: 200px; overflow: auto; } This makes it so that when the table is >200px, a scrollbar appears only for the table and the other elements on the page stay put. Great! Now for our friend IE... In IE, the element spawns the vertical...

Share Styling Between CSS Classes

In this question, I was given a really cool answer to alternating an image and its description between left and right, respectively. Now I want to apply styling to both, e.g. padding-top, padding-bottom etc. How do I apply a style to both the RowStyle and AlternatingRowStyle in this scenario. <AlternatingRowStyle CssClass="ProductAltIt...

HTML UL width

Given the following markup: <ul> <li>apple</li> <li class="highlight">orange</li> <li>pear</li> </ul> Both the ul's and the li's widths appear to be 100%. If I apply a background-color to the list item, the highlight stretches the full width of the page. I only want the background highlight to stretch as wide as the widest i...

Center Align on a Absolutely Positioned Div

div#thing { position: absolute; top: 0px; z-index: 2; margin: 0 auto; } <div id="thing"> <p>text text text with no fixed size, variable font</p> </div> The div is at the top, but I can't center it with <center> or margin: 0 auto; ...

Is it possible to simulate spacing between table cells such that vertical and horizontal spacing are different?

In CSS, you can specify the spacing between table cells using the border-spacing property of a table. However, this results in uniform spacing between columns and rows, and I am finding more situations where the designs I am using call for gaps between rows, but not columns, or visa versa. If I have a solid background, I can simulate s...

CSS shadows on 3 sides

I'm looking at all the CSS Drop shadow tutorials, which are great. Unfortunately, I need to put a shadow on three sides of a block element (left, bottom, right). All the tutorials talk about shifting your block element up and to the left. Anyone have insights into putting a shadow on three or even four sides? ...

Markdown and image alignment

I'm helping out a friend with a non-profit site that publishes articles in issues each month. They are mostly straightforward, and I think using a markdown editor (like the wmd one here in SO) would be perfect. However, they do need the ability to have images right-aligned in a given paragraph. I can't see any way to do that with the cur...

Why doesn't dynamically generated content change the height of containing div?

I am writing a footer div that displays info from the database. The footer has a different background color than the rest of the page, and will have a height that depends on how much content the database throws to it. When I generate the content with php and call for a border around the footer div, the content appears and is, let's say...

What is the simplest jQuery way to have a 'position:fixed' (always at top) div?

I'm relatively new to jQuery, but so far what I've seen I like. What I want is for a div (or any element) to be across the top of the page as if "position: fixed" worked in every browser. I do not want something complicated. I do not want giant CSS hacks. I would prefer if just using jQuery (version 1.2.6) is good enough, but if I need ...

form layout with CSS

Hi, I need to create a form with, half linear view (textboxes and dropdownlists in separate line) and the other half, non linear view i.e. the textboxes will appear next to each other, like first name and last name will be next to each other. I am aware how to acomplish the linear view with CSS. I am using fieldset { clear: both; ...

CSS fixed width in a span.

Within an unordered list. <li><span></span> The lazy dog.</li> <li><span>AND</span> The lazy cat.</li> <li><span>OR</span> The active goldfish.</li> Adding a class or style attribute is permitted but padding the text and adding or changing tags is not allowed. The page is rendering with Courier New. Goal is to have text after span l...

Label Text Alignment in fieldset with CSS

Hi, In my fieldset I have labels next (side) to my textboxes, but for some reason, they are towards the top and not middle. Here is my CSS for the fieldset fieldset { clear: both; font-size: 100%; border-color: #000000; border-width: 1px 0 0 0; border-style: solid none none none; padding: 10px; margin: 0 0 0 0; } label ...

Footer knocked out by 1px in IE6

Heres the link: DAMNIE6TOHELL As you can see if viewed in glorious 'IE6-o-color', the footer is shifting 1px over to the left. I'm struggling to find a fix for this, I've whittled it down to a bare minimum of HTML. Is it something to do with haslayout perhaps? Any help much appreciated. ...

Fix browser bugs as you go or save them up till the end?

With CSS bugs, do you fix them as and when they arise during each stage of your development, or do you save them up till the end? as I'm at quite an early stage in a large project and seem to be getting bogged down with annoying IE6 bugs. ...

CSS div element - how to show horizontal scroll bars only?

I have a div container and have defined its style as follows: div#tbl-container { width: 600px; overflow: auto; scrollbar-base-color:#ffeaff } This gives me both horizontal and vertical scroll bars automatically once I populate my table which is contained by this div. I just want only horizontal scroll bars to appe...

IE6 Bullets on lists

My link is here: Example Page I'm using list-style-image: to give my horizontal lists ( very top and bottom ) seperators. I have a class of .first to remove the image from the first li in each list. Lo and behold in IE6, it doesn't work. What happens is that the bullet images are not being displayed, and also the bottom few pixels of ...

Can you change the width of a scroll bar (scrolling DIV) in IE7

Hi Is there any way to change the entire width of the horizontal scroll bar on a scrolling div (including the nudge arrows and the handle). EDIT: I only need an IE7 solution - it's for a scrolling DIV on a touch screen terminal Thanks Matt ...

Disappearing bullet points

http://biochrom.fivesite.co.uk/catalogue4.asp On the page above there is an image floated to the left. To the right of it is a list, titled "features". The list items have a background image, however, it isn't appearing. List 2 shows how the background image looks. Does anyone know how I can make the bullets visible? ...

What do you use to test the handheld css on your website?

I've been adding css support for handheld to my website but haven't been able to find a good tool for testing. I tried using the webdeveloper plugin for Firefox but it doesn't work for me. Maybe that is because all my css is in the html and not a seperate css file. Are there any other testing tools available aside from going out and b...

Problem with <input type='text' /> and <textarea> width

In the following code, both the INPUT and TEXTAREA elements render wider than they should. How can I limit them to 100% of the usable area within the div? <!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" xml:lang="en" ...