css

How to show scrollbar in Swing's JOptionPane.showOptionDialog?

Hi, In our Swing application, we show error messages using JOptionPane.showOptionDialog. However, some of the messages are long and we would like to limit the height of the dialog and show a scrollbar. We thought of using HTML and CSS in the dialog text to limit the height and show scrollbar, but it seems Swing's HTML & CSS is quite limi...

div background images shows up, but background color does not

Hello, I'm having a minor css issue. I have a series of layered divs and I've set div class styles and they all show up (padding, font colors,etc). However, the background-color will not work for the overlaying divs. as a test, I tried to set a border and border styles, and they all worked as well, except the border color, it didn't s...

How to add a full-sized image to the center of a webpage using jQuery?

The way I have my site setup is that I have a grid of thumbnails that is sized based on the user's screen resolution and also has a scrolling mechanism in it. Another feature I'm trying to add is the ability to click on a thumbnail and have the image you clicked appear in the center of the screen at full size (or as close to full size a...

jQuery UI confirmation dialog - manipulating output

I need to modify the dialog confirmation buttons. I want to have the confirm and cancel buttons swapped around (so cancel is to the right not the left of the confirm button). I also want to change the background image on the confirm button so that it's a different colour. I thought about doing this in seperate jQuery code so that I don't...

CSS randomly breaking?

Breaking in two senses, 1) Functionally breaking and 2) <BR>eaking to a new line. I have no idea what's causing this problem.. but randomly as I load divs of data with php, I'll get maybe 1 out of 10 to bust: I can't for the life of me figure this out. Has anyone experienced this before? It's not any specific column or row that's ha...

How to emulate the look of an off-white sheet of paper on a computer screen

Thanks for the comments below. In hindsight, I should have been more detailed. I hope the edited version is clearer. At a high-level, I want to emulate the look of paper as a screen background. This is because I find white (#FFFFF) to be too bright. I looked at a few hardcover books I own and noticed that none of them are bright white. ...

Do you use any tools for rapid html/css development?

I just heard about zen-coding, which basically is just a script that generates markup based on a css-esque selector, ex: div#foo > p*6 generates <div id="foo"> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> </div> Edit: Here's a more advanced example.. And PS - I'm not even going through any API, I'm total...

preload hidden css images

I'm working on a jquery based homepage with 5 or so hidden divs, each containing several background css images. The issue is that the browser doesn't load css images into the DOM until the visibility of the parent layer is shown, causing images to slowly load in when the layer becomes visible. Solutions I've already considered: CSS...

Image rollover-zoom near mouse

I have an advent/christmas calendar. Everyday is another picture with one more door opened. To make these regions clickable I used CSS and IDs like this: CSS: ul#doorregions { list-style: none; background: url(<?php echo($pictureoftheday); ?>) no-repeat 0 0; position: relative; width: 950px; height: 575px; margin: 0; pa...

js and css on-demand loading

i am confused by the concept of on-demand loading I saw this blog post and was wondering if I could do the same with php using the ff. approach: check current url serve css or js based on current url which may be done like this in Kohana if (uri::segment(1) == 'search') // check current url echo html::stylesheet('search.css'); // s...

Wrapping text within a multiple <select> list

I want to give the user the ability to select multiple elements (which happen to be about a paragraph each). The problem is that a standard select multiple in html is (as far as I can tell) a single line per choice. This is a problem as the layout gets very screwy if I let the line go long. Also, if I just truncate the line, the main ...

CSS selectors: Is there a way to select surrounding elements?

I have a feeling this might involve some sort of advanced selectors, but I could be wrong. I have this HTML to work with: <dt></dt> <dd><input type="hidden" class="hidden"></dd> ...and I need to make the DT and DD tags to be hidden from view. I am able to apply a class on the input tag but not on the others. So how can I apply the "hi...

How to apply a css class on a MVC Html.TextBox

I have the following tag in my MVC Application. How can I apply a class to my textbox? <%= Html.TextBox("username", "", new { maxlength = 50 })%> ...

How to simulate the top site message bar that StackOverflow uses in Rails for the flash[:notice] and flash[:error] messages

I want to render my Rails flash[:notice] and flash[:error] messages in a bar at the top of the screen, similar to the message bar that StackOverflow uses when you get a new badge etc. Does anyone know how I can achieve this elegantly? Extra credit to make it slide in. ...

HTML / CSS Setting for Opera

body { padding:0px; background:#2786f4; position:relative; margin:0; color:#818181; text-align:center; } <!--[if IE]> <style> #Right { width:202px; background:#f1f1f1; ...

Firefox not respecting line-height

The problem may appear in other browsers too, I haven't checked yet. Sorry but this will take some amount of work on your part. Please bear with me. Open Firefox. You need the Firebug extension or something that will let you run a single JS command. Go here. Sorry for all the anime. Open the Firebug console and run the following comma...

How to make a div top center?

I'm now doing it this way,which is not centered: $div = $('<div style="background-color:yellow;position:absolute;top:0;"><b>Loading...</b></div>').appendTo('body'); ...

Browsers issues

Hi guys, I am having a cross browser problem with IE 7 and I have decided to go for a different style sheet for it. Could you please advise me what is the best way to call IE7 when used? And keep of course the other one for all the other browser. Many thanks Francesco ...

How to make a div to show scrollbars (without fixed height)?

I have a page with two divs on it which should fill the entire screen. Both of them have width = 100% The upper one's height should be defined by its content (the minimal possible height that fits all content) and never show any scrollbars. The lower one should fill the rest of the screen. However, if its content does not fit the div,...

jQuery: match an element by searching for style="font-size: 70%"?

How can I match all a-tags which have a font-size of 70%? <a href="/tag/customersproducts" style="font-size: 70%; text-decoration: none;">customersproducts</a> <a href="/tag/dealers" style="font-size: 70%; text-decoration: none;">dealers</a> <a href="/tag/dealershops" style="font-size: 101%; text-decoration: none;">dealershops</a> <a...