css

CSS, if html is value, change color

Sorry For being unclear, what I mean is this. Currently on page load I fetch the links with a certain id, I check my database, then json back the result into the link. So Essentially: <a href="#" class="switcher" id="Site_Gallery-<?php echo $item->id; ?>">...loading....</a> Becomes either: <a id="Site_Gallery-563" class="switcher" h...

Count child DIVs + add class

Hello I have the following bit of code to display thumbnails on a page: <div id="gallery"> <div class="thumbnail"> <img src="" /> </div> </div> This will loop to show 15 .thumbnail DIVs. I would like to attach a class of ".last" to the 5th DIV and the 10th DIV. And for the 11-15th DIVs a class of ".bottom-last". ...

Multiline Link Formatting Conundrum

On a webpage, I have markup like the following: <h3>Title Goes here</h3> <a href="...">Link goes here</a> <h3>Next title</h3> <a href="...">Next link</a> Some of these links have very long text and span multiple lines. I would like the following to occur: There is spacing between the first heading's link and the second heading. Lin...

Dynamic Selectbox not centering correctly in IE7.

I have a selectbox that is dynamically filled with an Ajax call. The user enters a zip code in a textbox and then the selectbox is filled with cities in that zip code. My problem is that the selectbox starts out empty but centered correctly. Once it is filled dynamically from the Ajax response, IE simply expands the selectbox to the r...

Organizing CSS rules

I'm thinking about organizing my CSS better. One suggestion is to use something like .LESS I'm using ASP.NET and there is currently a Beta .LESS for .NET Curious if there are other solutions like .LESS? ...

CSS List Spacing After Paragraph

If I have user generated content such as: <p>my paragraph</p> <ul><li>item1</li> <li>item2</li> </ul> This outputs with a paragraph gap between the end of the paragraph and the list like so: my paragraph item1 item2 I know I can get rid of the gap in my CSS by setting margin-top on the UL tag and margin-bottom on the ...

Pure CSS Drop down menu's 3rd tier: to match the width of its widest sibling.

Hi, I wonder why the width of the 3rd list in my drop down menu does not have the width of its longest text length. I have removed the width completely so that by default, the width of the list can match its longest text length. Does anyone know how to fix this?? This is the html, <div id="footer"> <ul> ...

How can I disable the color defined in an previously defined CSS class.

Recently when coding and HTML email, I noticed that Yahoo! started hijacking certain links and keywords, adding a <span class='yshortcuts'> which changes the colors of the text and links, which can cause some pretty bad rendering problems. The 'fix' that Yahoo! suggested is pretty ugly (adding a span within all of the links and keywo...

Why do inputs and selects use different box models?

It appears (at least in IE 8 and Firefox 3) that for <input> elements the width refers to the content, but for <select> elements the width refers to the content + borders. I am explicitly specifying the width in the CSS style. What's the deal? I would have thought that both are inline replaced elements and would behave identically. I...

CSS problem height from top

using css how do I put a span on top of other spans. I have several spans in the page and at the end of the page I have this <span id="lastSpan" style=" margin-left:726px; margin-top:30px;"></span> problem with that is that it never goes to 30px down from top. and stuck at same height. any help will be appreciated thanks ...

How to change width of centre column to fixed 1000 pixels w/o breaking fluid left and fluid right columns

#left-side-outer { width:50%; float:left; margin-right:-400px; } #left-side{ margin-right:400px; background-color: #FF9900; background: transparent url('../images/grass_pattern.png') repeat-x bottom !important; height: 82px; } #right-side-outer { width:50%; float:right; margin-left:-401px; he...

Aligning text vertically inside a label div

I'm trying to recode one of my older forms. It was filled with tables that I want to replace with CSS. However I'm having trouble having text and a form element aligned vertically together. As the picture shows the text defaults to starting at the top instead of in the middle. The blue highlights around the row is dreamweavers interpre...

background-color not covering full screen with xsl in xhtml

When I tried to convert my website to xhtml, things went perfectly until I realized that IE doesn't support it. I went to the xhtml FAQ's section about IE, and tried out the workaround there, using an identity transformation to trick IE into rendering it as html in quirks mode. Unfortunately, this seems to make firefox (and possibly oth...

css3 drop shadow under another div, z-index not working

i'm trying to use a drop shadow to make it look like one div (the header) is "above" another. my problem is that the "middle" div is covering the drop shadow. i tried using z-index to put the header div about the middle div, but it's not working (the shadow is still being covered). when i put a break between the divs, i can see the shado...

How do i stop text wrapping around some floated divs?

i floated 3 images in divs in the middle of a long section of text. i want to float them so the site keeps it's 'liquid' design, adapting to any width browser window. But if text starts wrapping to the left of them on wide windows, it looks bad. i'd like them to float, but still be able to clear text around them so they look like a block...

CSS icons with some semantic text, browsercompatibility issues...

Hi, I'm using this code to display sprite driven icons (if graphics are available only the icons should show up, for other devices the text is supposed to help): Markup: <span class="icon ok">OK</span> CSS: .icon { display:block; width:16px; height:16px; padding-left:40px; overflow:hidden; background:transparent url(sprite.png) 0px ...

GWT setStylePrimaryName for all of instances of a widget

saveButton.setStylePrimaryName("jtyfj"); If I do that to a button, it removes the default "gwt-button' class and replaces it with 'jtyfj'. My question is, is there a way to apply this yo all buttons by default. I'd really rather not have any default gwt-styles being referenced. Also, is there a way to do it with a ClientBundle CSSReso...

Horizontally centering/evenly distributed <li> inside of <ul> inside a <div>

Have a Navbar <div>, inside is a <ul> and each <li> contains a <a> with a link (this is for a navigation bar) I looked on google and this site and i couldnt find exactly what i was looking for. What i want is to be able to keep my current style (using <li> with <a>'s inside) and i want the <li> to be evenly distributed and centered (th...

jQuery - If I'm moving a div with the keyboard...

Yo! If I have a div with a fixed height and width, which I am moving using keypress (or keydown/keyup). Can I get the window to "follow" that div? I know you can auto scroll a page, but can you get the co-ordinates of a div and scroll the page as the div moves? Cheers :) ...

jQuery Tabbed Interface CSS Problem

Hello! I'm coding a tabbed interface using jQuery and whilst it all works, functionality wise, there is a problem with the CSS. When a tab is active it's text color is meant to change to white but it doesn't even though it is in the CSS and it only changes on hover. Please look at this code and tell me what I'm doing wrong! Here's the ...