css

Can't get a block of div tags to arrange themselves right.

I'm using this block of code (mostly copied from a PHP.net comment here - http://www.php.net/manual/en/function.imagecolorat.php) in order to read in a picture, scan it pixel by pixel and output the picture as a block of div tags in a table-like fashion. Here's what I came up with... <?php $img = imagecreatefrompng("image1.png"); $w...

jquery prevent unwanted animation

I have a list of of 10 icons that make up a menu. By default, the first icon will be bigger than the others to show that it is active. When the user hovers over another icon, the first icon will shrink and the other will grow and if they hover out, the first icon will return to its big (active) state again. The problem is, if you quickl...

jquery css height setting not functioning properly

I'm trying to use some jQuery to set the left and right columns of my product and catalog pages (with a class of .columns) to the height of my #detail <div> which has some data pulled from a SQL database. So, I am using this jQuery code: $(document).ready(function() { detailHeight = $('#detail').css('height'); columnHeight = detai...

css min-height property not working in mozilla and ie7

i tried setting min-height property of <td style="min-height:500px"></td> works fine on ie8, but not on IE7 and mozilla 3.5 Thanks in advance for solutions ...

Attempting to optimize a pixel reading and outputing function.

$img = imagecreatefrompng("img/".$image); $w = imagesx($img); $h = imagesy($img); $pixelcount = 0; echo "<div id='container' style='width: {$w}px; height: {$h}px;'>\r\n"; for($y=0;$y<$h;$y++) { for($x=0;$x<$w;$x++) { $rgb = imagecolorat($img, $x, $y); $r = ($rgb >> 16) & 0x...

Change default stylesheet dir in rails

Would anyone know to change the default stylesheet directory /public/stylesheets to /public/css in rails 3? I found a variable called config.stylesheets_dir = '/css' This didn't work though. I know I can do <%= stylesheet_link_tag '/css/mystyle.css' %> but I'm curious if there's a better way. ...

how to fix opacity on IE6

how to fix opacity on IE6 This code does not work on IE6 ! filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5; And this code ! $('#description').animate({opacity: 0.0}, 1000); ...

Form positioning problem

I have a Windows program which generates forms. It takes the Top/Left properties at form design time in the Windows program and generates HTML to display the form, using position: absolute and the original Top/Left. Now I want to split my HTML page into three panes/sections : 1) a menu bar across the top 2) the form, as designed in ...

How to stick the last menu item automatically to the right corner?

Hi guys, I'm trying to create a menu, in which the last menu item (with different class) will stick automatically to the right corner of the menu. I'm attaching a screenshot for this. There are a few menu items on the left and the last item should somehow count the rest of the available space on the right in the menu div, add this space ...

How do I a embed a variable css style in a VB.NET xml string literal?

I would like to add a variable data to a string literal WITHIN the HTML tag Dim locationOfImage as string = "http://blahblah......" Dim xmlString = _ <div style="background:url(" <%= locationOfImage %> ")"> <h3>Some text</h3> </div> The above does not work, I can't quickly determine how to d...

How to add spacing between two span elements

I have two span elements. I want them to sit side-by-side and contain some text. Is this possible? If so what am I doing wrong? .added-box{ background-color:#06C; padding:8px; margin:8px; } .edited-box{ background-color:#093; padding:8px; margin:8px; } And the page code is: <p align="right"> <span class="edited-box">sfds<...

How to use jQuery's .css() with variable property name ?

Instead of writing: $('div').css({'backgroundColor': 'red'}); I want to write something like: $('div').css({get_property_name(): 'red'}); where get_property_name() will return "backgroundColor", "color", "border-top-color", or any other property. What options do I have to make it work ? ...

Align menu to center of page

Given the following menu structure: <div id="smoothmenu1" class="ddsmoothmenu"> <ul> <li><a href="Default.aspx">Home</a></li> <li><a href="About.aspx">About Us</a></li> <li><a href="#">Automotives</a> <ul> <li><a href="#">Masking Film</a></li> <li><a href="#">Promo Items</a></li> <li><a href="#">Accessori...

jQuery conditional problem

I am trying to create a conditional statement on my dynamic product pages on my website, to aid the setting of the height of my columns (both left and right) and the center part (the #detail <div>). I have this bit of code now: $(window).load(function() { detailHeight = $('#detail').height(); columnHeight = detailHeight + 20; $...

Problem with fluid layout in Chrome

I have two columns. One with fixed size (220px) and the other that fills up the remaining space. <div id="left-panel"> </div> <div id="main-panel"> Content </div> CSS: #left-panel { float: left; width: 220px; height:auto !important; height:750px; min-height: 750px; border-right: 2px solid #d1d1d1; ...

Ruby on Rails: CSS and skins management

I have a skin support in my app. I'm looking for a tool, which will enable the customer (not the programmer, which is current) alter the skins. Is there an admin tool (gem, plugin) for Rails to manage (edit, create, view) these skins? I looking for some easy solution like /admin/skins page where I could do all the stuff, otherwise I'm g...

Div Size Automatically size of content

I am trying to make a h2 header for sidebar widgets but I want the width of the div class to be whatever width the content becomes. It seems I can't just set a width because those headlines with longer content then shorter content makes it break. http://mibsoftware.us/clients/raveis/ How can I simply make width stretch/change dependi...

CSS: 100% width or height while keeping aspect ratio?

Currently, with STYLE, i can use "width: 100%" and "auto" on the height (or vice versa)... but i still can't constrain the image into a specific position, either being too wide or too tall, respectively... any ideas? ...

DWR call fixes CSS problem in IE7???

Hi, I am facing a very strange issue in IE7. In our project I use DWR for getting data from server and then to transform them into table rows. This HTML result I insert into DOM. And here is the problem - after inserting the rows. I have table that has only one row and one column and the background of the only one cell is let's say red....

webkit transforms CSS and overflow

Hi, I have a div, in which its contents are being transformed using webkit css transforms. Now the div has overflow: hidden;, but the contents after transformation keep showing up outside the div. Why is this? ...