css

CSS Alignment Problem

Hi, I am trying to layout a header for a web site and I would like to have 4 containers in the header for dropping various user controls into. The 4 containers need to be positioned top left, top right, bottom left and bottom right inside the main the header container. So far I can acheive this, the bit I can't do is that the bottom le...

z-index not behaving as i'd expect

so i've got this, roughly: <div id="A"> <ul> <li id="B">foo</li> </ul> </div> <div id="C"> ... </div> These are positioned so that B and C overlap. A has a z-index of 90, B has a z-index of 92, and C has a z-index of 91. But C shows up in front of B. What am i doing wrong? (Let me know if more detail is necessary....

Details View and CSS Compliance

I'm still having a hard time not wanting to use Tables to do my Details View Layout in HTML. I want to run some samples by people and get some opinions. What you would prefer to see in the html for a Details View? Which one has the least hurddles cross browser? Which is the most compliant? Which one looks better if a I have a static...

Convert HTML + CSS to PDF with PHP?

Ok, I'm now banging my head against a brick wall with this one. I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7. It uses fairly basic CSS to style it and renders fine in HTML. I'm now after a way of converting it to PDF. I have tried: DOMPDF: it had huge problems with tables. I factored out my large nes...

ASP.NET advertisement website

I am currently working on a website that is an advertisement portal for businesses. Advertisers can create an account, select various options for listing (State, caregory, etc) and upload a graphic is measured in a multiples of an "unit". An "unit" is an image or a flash file that is 180px wide and 120 high. An advertiser can choose mult...

Colour of Text in a Javascript Alert

Is there any way to change style of text, format the text inside a Javascript Alert box. e.g. changing its colour, making it bold, etc.? Also, if there an Alert avalaible with a 'Yes', 'No' button instead of an 'OK'/'Cancel' one? ...

Button styling using CSS background image

I have used background image and css border to a button. It looks good in Firefox but IE does not show it correctly. The top border is not aligned with left, right borders in IE. How to correct it in IE? Below links for your reference.Screen shot IESelectorScreen shot Firefox ...

Best Book(s) for ASP.NET web applications?

I'm looking for a book that can help me setup up web applications using ASP.NET. I'm not looking so much at the coding side (i.e. C# or the .NET framework) of things, but rather the actual building up of a website from scratch. So perhaps the book is more HTML/Javascript/CSS. So basically, I have a 'blank piece of paper', and I want to ...

Find non-active CSS properties

Is it possible to determine styles in a CSS file through Javascript? I am trying to detect CSS properties that will be applied to an element in a certain state, :hover in this case, but without those properties currently being active on the element. I had thought about cloning the element, appending the clone as a sibling with display:n...

Showing flash above content.

I have a page with a tutorial (http://www.poromenos.org/tutorials/bittorrent/download), but the site layout obscures the flash player, which is too wide. Is there a way to show the flash above the content through the z-order (or something else, lightbox-y)? ...

Why don't CSS ids work like namespaces?

It would seem natural to me that CSS would support this: <div id="comment1"> <div id="helpText">...</div> </div> <div id="comment2"> <div id="helpText">...</div> </div> <div id="comment3"> <div id="helpText">...</div> </div> #comment1#helpText #comment2#helpText #comment3#helpText But since CSS ids must be unique, I nee...

How to create Facebook style fixed Status bar ?

I want to create fixed status bar in by web form to display various status/messages/notification to user , i can used fixed CSS property but i want to implement in i.e 6/7 and in Firefox. and all the browsers. ...

how to make textarea same width in IE and Firefox?

I want to have a textarea that's 500px, this is the CSS I use for the textarea: width: 498px; padding: 0px; margin: 0px; I noticed IE and Chrome have a 1px border by default, on the other hand FF have a 2px border which results the textarea to be 502px instead of 500px, any workarounds? Just a note, I could explicitly specify the texa...

how to force asp:label inside asp:table to always have the same width?

I don't really FEEL css and it doesn't always work as i think it would. This is one of these situations: i have a simple (2 rows, 2 columns) asp:table generated dynamically. in the right column it contains a combo box (cell (0, 1)) and a label (cell (1,1)). when i change the combobox's selection, the text in the label changes too. if it...

Get css top value as number not as string?

In jQuery you can get the top position relative to the parent as a number, but you can not get the css top value as a number if it was set in px. Say I have the following: #elem{ position:relative; top:10px; } <div> Bla text bla this takes op vertical space.... <div id='elem'>bla</div> </div> $('#elem').position().top; //...

Get Element StyleSheet Style in JavaScript

I've been using John Resig's getStyle function from Pro JavaScript Techniques to get the style of elements: function getStyle(elem, name) { // J/S Pro Techniques p136 if (elem.style[name]) { return elem.style[name]; } else if (elem.currentStyle) { return elem.currentStyle[name]; } else if (document.de...

What is the best way to center an html element within its containing element?

Let's say you have the following chunk of code: <div id="container"> <someelement>This is any element.</someelement> </div> What's the best CSS I could use to horizontally center "someelement" within its containing div? ...

What's The Best Way of Centering a Div Vertically with CSS

I want to center a div vertically with CSS. I don't want tables or Javascript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support. <body> <div>Div to be aligned vertically</div> </body> How can I center a div vertically in all major browsers, including Internet Explorer 6? ...

Radio/checkbox alignment in HTML/CSS

What is the cleanest way to align properly radio buttons / checkboxes with text? The only reliable solution which I have been using so far is table based: <table> <tr> <td><input type="radio" name="opt"></td> <td>Option 1</td> </tr> <tr> <td><input type="radio" name="opt"></td> <td>Option 2</td> </tr> </table> This may...

Easiest way to alternate row colors in PHP/HTML?

Here's a PHP example of mine. Can anyone find a shorter/easier way to do this? <? foreach($posts as $post){?> <div class="<?=($c++%2==1)?‘odd’:NULL?>"> <?=$post?> </div> <? }?> <style> .odd{background-color:red;} </style> Examples in other languages would be fun to see as well. ...