css

How to center text over an image in a table using javascript, css, and/or html?

How to center text over an image in a table cell using javascript, css, and/or html? I have an HTML table containing images - all the same size - and I want to center a text label over each image. The text in the labels may vary in size. Horizontal centering is not difficult, but vertical centering is. ADDENDUM: i did end up having to ...

How to implement a web page that scales when the browser window is resized?

How to implement a web page that scales when the browser window is resized? I can lay out the elements of the page using either a table or CSS float sections, but i want the display to rescale when the browser window is resized i have a working solution using AJAX PRO and DIVs with overflow:auto and an onwindowresize hook, but it is cu...

iframe sizing

I am displaying pages from an external site (that I own) in an iframe in one of my pages, and it's fine except when viewed in Opera with the browser reduced down (not widescreen), when the iframe shrinks and squashes the content. It works in widescreen (maximise browser window), and is OK in IE7, Firefox, Chrome and Safari in maximise an...

Can CSS truly override the order of HTML elements on a page?

If you have several DIVs on a page, you can use CSS to size and float them, and move them round a little...but I can't see a way to get past the fact that the first DIV will show near the top of the page, and the last DIV will be near the bottom! I cannot completely override the order of the elements as they come from the source HTML.......

Apply inline CSS to an ASP.NET server control

Based on a simple test I ran, I don't think it's possible to put an inline <style> tag into an ASP.NET server control. The style did not end up rendering to the output HTML. Even if it was possible, I'm sure it is bad practice to do this. Is it possible to do this? I can see it being useful for quick prototypes that just have 1 or 2 ...

Converting Table Layout To Div

I'm implementing a comment control that uses an ASP.Repeater to display each comment. The comment itself is currently displayed using a table to divide up some images to display the comment in a bubble. I know that tables are supposed to be the epitome of evil for design layout, and really expensive to display for the browser, but I'm ...

Non-breaking non-space in HTML

I have a bowling web application that allows pretty detailed frame-by-frame information entry. One thing it allows is tracking which pins were knocked down on each ball. To display this information, I make it look like a rack of pins: o o o o o o o o o o Images are used to represent the pins. So, for the back row, I have 4 img...

Min-width in MSIE 6

What is the definitive way to mimic the CSS property min-width in Internet Explorer 6? Is it better not to try? ...

float divs

I have a list with two <div>s in every <li> and I want to float them one next to the other and I want the <li> to take the whole availabe space. How do I do it? <html> <head> <title></title> <style type="text/css"> body { } ul { } li { } .a { } .b { } </style> </head> <body> <ul> <li> <div class="a"> content </div> <div class="b"> conte...

What might cause CSS to fail to load occassionally on all browsers?

I'm working on a webapp, and every so often we run into situations where pages will load without applying CSS. This problem has shown up in IE6, IE7, Safari 3, and FF3. A page refresh will always fix the problem. There are 3 CSS files loaded, all within the same style block using @import: <STYLE type="text/css"> @import url([base cs...

Does the CSS 'font-size: medium' set font to .Body font size or to the *browser*'s base font size?

in "CSS: The missing manual" the author says that font-size: medium (or other size keywords) sets the font relative to the browser's base font size. But what I'm seeing in FF2 and IE6 is that it sets the font size to what I specified in the .CSS HTML or BODY style (which is much preferred). If it works the latter way, this is very han...

DIVs vs. TABLEs a rebuttal please

There are lots of people out there asking "why shouldn't we use tables for structuring our HTML" and while a lot of answers come in, I rarely see anyone being converted to the world of semantics. That said, I've yet to see any convincing rebuttals to support the rationale for why we should (or might) use tables. Anyone care to offer a r...

Absolute position, can someone explain this

Here is a snippet of CSS that I need explained: #section { width: 860px; background: url(/blah.png); position: absolute; top: 0; left: 50%; margin-left: -445px; } Ok so its absolute positioning of an image obviously. top is like padding from the top, right? what does left 50% do? why is the left margin at -445px? Upda...

How can I create a Netflix-style iframe overlay without a huge javascript library?

I'm trying to use a link to open an overlay instead of in a separate popup window. This overlay should consist of a semi-transparent div layer that blocks the whole screen from being clicked on. I also aim to disable scrolling at this point. Not matter where you are on the main page, when the link is clicked, the overlay should be in the...

CSS Reset, default styles for common elements

Hi, After applying a CSS reset, I want to get back to 'normal' behavior for html elements like: p, h1..h6, strong, ul and li. Now when I say normal I mean e.g. the p element adds spacing or a carriage return like result when used, or the size of the font and boldness for a h1 tag, along with the spacing. I realize it is totally up to ...

Looking for visual CSS generator

Looking for some sort of tool that would allow me to layout my page visually using some sort of GUI, then generate the necessary CSS that would allow a web page to look like that. I am new to this sort of thing, so please tell me if this is even possible! ...

What are the quickest and easiest ways to ensure existing web pages display well on mobile platforms?

The pages in question contain a lot of javascript and CSS. How well are these supported by mobile platforms generally? Is there a browser emulator (or equivalent tool) to assist testing? ...

Force browser to use new CSS

Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version? ...

CSS Margin Collapsing

Hi, So essentially does margin collapsing occur when you don't set any margin or padding or border to a given div element? ...

css organization and colours

I just finished a medium sized web site and one thing I noticed about my css organization was that I have a lot of hard coded colour values throughout. This obviously isn't great for maintainability. Generally, when I design a site I pick 3-5 main colours for a theme. I end up setting some default values for paragraphs, links, etc... ...