css

How to center a <div> element in IE6

Hey, trying to implement a dialog-box style behaviour using a separate div section with all the stuff inside it. When the "dialog box" needs to be shown, it has to display at the center of the WINDOW, not in the center of the page, that is, REGARDLESS of the scroling position. Furthermore, the correct solution will not move the "dialog...

Replacing header text with an image

I am working on setting up a Drupal based website and wanted to replace the site title in the header with an image file. I came across this article: "Revised Image Replacement" summarizing several techniques for doing just that. I was wondering what the current best practice is, in terms of SEO and browser compatibility? ...

Who has solved the long-word-breaks-my-div problem? (hint: not stackoverflow)

Ever since switching from TABLE-layout to DIV-layout, one common problem remains: PROBLEM: you fill your DIV with dynamic text and inevitably there is a super-long word that extends over the edge of your div column and makes your site look unprofessional. RETRO-WHINING: This never happened with table layouts. A table cell will always n...

Safe Width in Pixel for Printing Web Pages?

What is the safe width in pixel to print a web page? My page includes large images and I want to make sure they will not be cut of when printed. I know about different browser margins and US Letter / DIN A4 paper sizes. So we got standard letter sized and some default DPI values. But can I convert these into pixel values to specify in...

manipulating css layers with javascript

Hello, I am wondering if it is possible to have a sort of thumbnail image gallery, in which clicking on a thumbnail would show the full image in a layer. I was wondering if it was possible to load all layers and respective images and use javascript to change the z index or something similar to avoid having to reload or leave the page. I...

css: Should I limit the use of universal selectors (*.classname vs a.classname)?

I have a question about css selectors. Say I have the following html <div class="message"> <div class="messageheader"> <div class='name'>A news story</div> </div> </div> In the css I could refer to the class called name either like this div.message div.messageheader div.name {} or .name {} /* ie *.name{} */ Is one way ...

Problem with Pseudoclass and text-decoration:underline in IE6

I am using a piece of html something like the following:- <a class="somePseudoClass" title="Blablabla">Something</a> and I have the following css in an imported file. a.somePseudoClass:hover {color: #000000; text-decoration: underline;} This works perfectly in Firefox 2.0 but in IE6 the underline fails to show. Does anyone know o...

js horizontal slide effect

i'm currently using jQuery and am looking for a way to slide an image left as a new image slides left into its place. specifically, i have a static image of an iphone. when i click a link, i need the current image displaying on the iphone's image viewer to slide out to the left as the new image slides in from the right. oftentimes the...

Need help displaying children lists without spacing the parent lists

I am printing out a list of college majors we offer, then within each major, we have concentrations for each major. Our Science Major has the following concentrations: Environmental Science & Forestry, Chiropractic, Chemistry, Biology Here is a screen shot of what it is doing: I do not want the spacing it displays (I do not want the ...

What's the difference between these two methods of linking a html page to a css file?

I've been reading through a few tutorials about css, and I saw two different ways to state which css file should be used to style the page: <style type="text/css">@import url("style.css");</style> and <link rel="stylesheet" type="text/css" href="style.css" /> What's the difference between them? Which one should I use? ...

CSS Trick to show border on table and cells when cells are not empty and show no border otherwise

Hi, Is there any way to make sure that a table and cells it contains have a border only when the cells are not empty? If all the cells of the table are empty, then no border should be visible. Kind regards, ...

Apply margins to all but iframe

Hi all, I have a ‘page a’ using ‘css a’. This page has margins set in css. I also have a ‘page b’ using ‘css b’. This page also has margins set in css, of the same size as in ‘css a’ (10px). Is there any way I can make it so that when I am viewing ‘page a’ on its own it has margins, but when viewed in an iframe on ‘page b’ the margins ...

What CSS/JS/HTML/XML plugin(s) do you use in Eclipse?

I'm looking for a good plugin for doing web front end work in Eclipse. I don't want something that completely takes over eclipse, or something that has masses of dependencies that need to be updated all the time, or something that is geared towards a particular server-side platform, or something that costs a heap. Is there something lig...

Can someone recommend a bells and whistles CSS framework?

I am looking for a bells and whistles CSS framework. I have found a number online that deal with "grids", and some that deal with "typography" and others that deal with "resetting". What I have not found is something that will give my web applications a consistent reusable style or theme. I guess it would have to have a number of prede...

word wrap in css / js

I'm looking for a cross-browser way of wrapping long portions of text that have no breaking spaces (e.g. long URLs) inside of divs with pre-determined widths. Here are some solutions I've found around the web and why they don't work for me: overflow : hidden / auto / scroll - I need the entire text to be visible without scrolling. The...

CSS Layouts - How to position two divs horizontally within another div

I haven't played with CSS for too long a time and am without references at the moment. My question should be fairly easy but googling isn't bringing up a sufficient answer. So, adding to the collective knowledge... |#header---------------------------------------------------------------| | TITLE ...

removing text layer and replacing with image

Hello, I have this code, which works fine, but I would like to be able to make it so when an image appears the text layer disapears, and there would be a link to bring the xt back and remove the image. How would I do this..., something to do with changing isibility and overlaying? <html> <script type="text/javascript"><!-- function sbo...

How do you read CSS rule values with JavaScript?

I would like to return a string with all of the contents of a CSS rule, like the format you'd see in an inline style. I'd like to be able to do this without knowing what is contained in a particular rule, so I can't just pull them out by style name (like .style.width etc.) The CSS: .test { width:80px; height:50px; backgrou...

Make Iframe to fit 100% of container's remaining height

I want to design a web page with a banner and a iframe. I hope the iframe can fill all the remaining page height and be resized automatically as browser resizing. Is it possible to get it done without writing Javascript code, only with CSS? I tried set height:100% on iframe, the result is quite close but the iframe tried to fill the w...

HTML & CSS Coding Guidelines

We are contracting an external consultant out to generate XHTML (Transitional) and CSS for most of the major pages of a new project we are currently working on. I've been asked to put together a list of guidelines for them so that we can be sure that a certain level of quality can be expected. As a bit of technical background, we will b...