css

Using CSS how do you move text down when a floated image is above a certain width?

I have a text block with an image floated left. The images can be of variable width. If the image is say greater than 2/3 the width of the block I want the text to drop down below the image but if not I want it beside the image. All of this is in Drupal if that matters. ...

how do I select a div with class "A" but NOT with class "B"?

I have some divs: <div class="A">"Target"</div> <div class="A B">"NotMyTarget"</div> <div class="A C">"NotMyTarget"</div> <div class="A D">"NotMyTarget"</div> <div class="A E">"NotMyTarget"</div> Is there a CSS selector that will get me the div containing Target but not the divs containing NotMyTarget? Solution must work on IE7, IE8,...

After completing a XHTML , CSS project , should we try to optimize our code?

After completing a XHTML , CSS project , and Even client is happy, should I try to optimize my HTML, CSS code if there is any scope? If yes then how to more improve and optimize code and what things can/should be optimized? Should i optimize to get lowest file size or i should optimize code for better readability? ...

Float Issue in IE

Ok I am making a simulated OS type interface. It should open up windows and have a drag handle. This all works perfectly. Then I added a image for an exit button I floated to the right... this made IE mad and IE screwed with the sizing and positioning =[ I've tried a crap load of things. None of which work. Anyone wana help? website is...

pseudo class a:focus

Trying to find out more about css pseudo class a:focus Am trying to adapt some code. Have tried a:focus img {border:2px solid rgb(155, 205, 255);} and a:focus img {background:rgb(155, 205, 255);} Neither work. Yet a:hover img {background:rgb(155, 205, 255);} works fine on hover. Does anyone know what I've done wrong?...

Parsing data without HTML tags

Hi, I need to extract the actual phone number form the html listed below, but I'm not really sure how to do it using Nokogiri CSS since there are no html tags around it. When an at_css(.phonetitle) it only parse Phone and not the number. <div class="detail"> <span class="address">Corner of Toorak Road and Chapel Street, South Yarra...

Is it possible to make Unordered list like this using CSS ?

Hi, Is it possible top make an unordered list in this image ? I cant use 2 images for single <li> tag If I use arrow as background and padding-left then the border-bottom will come under image as well. I cant use margin-left and background-position too I guess ? Any ideas ? Thanks ...

How do i make divs go into another row when full?

My code is something like the below. When theres 3 images everything is fine once theres 4 it gets full and moves the entire div.top into another row. How do i make the div inside top just start a new row instead? I tried writing .top width=500px but once it hits or passes it instead the images inside are squeeze together instead of eac...

jQuery center image

I've got an issue where I was tying to center images using the jQuery Cycle plugin. I found this solution, but it wasn't working on single images (there isn't always > 2 images), so I wrote my own little bit of code, which seems to be working, except it sometimes doesn't subtract the height of the image from the height of the div, and so...

remove/ignore float from outer div

This may sound weird but i have some css which aligns mys divs. In one place i also use http://www.brunildo.org/test/img_center.html which centers images. Now i want my divs inside a larger div to go to another line if this one gets full. float: left seems to be the answer. The problem is it ruins my formatting. Including solution in th...

How to select text, but not images, in CSS

Simple question: I have the following markup... <a href='#'> <img src='icon.png'> This is the link </a> I want to have the text become underlined on mouseover. What is the CSS selector for selecting only the text in that <a> element and nothing else? I'd rather not wrap it in anything if I don't have to. a:hover { text-decoratio...

Why are these divs not aligned and space between?

Why isnt everything aligned? No yellow should be visible and no orange should be visible except for the right side and bottom left where theres space for another image. Basically my images are pretty much aligned to the center (i have other pics not in this example which is easier to see). However in this case when i have 150px height i...

hide a space inside divs?

I have a div with 2 images side by side. Theres a space seperating the tags. Thus a space between the two images. Is there a way i can use css to hide the space (or text) inside of that div? ...

Uploadify button: Style with CSS?

Is it possible to replace the Uploadify button (which is a graphic containing up/over/down states) with a simple CSS-styled button? ...

Render Order via HTML or CSS

What is the best practice is in the case of altering the render order of elements on a webpage. For example, I have two DIVs that are to be displayed on a page: <div id="appleSection" class="appleStyle"> <!-- Apple DIVs, content, form elements, etc --> </div> <div id="orangeSection" class="orangeStyle"> <!-- Orange DIVs, conte...

Style common group of divs in one css statement.

I have a few divs created dynamically in Javascript.I was wondering if it is possible to style them all at once. #somediv { background-color: #F2F5FC; border-style:solid; border-bottom:thin dotted #33ccff; } #somediv2 { background-color: #F2F5FC; border-style:solid; border-bottom:thin dotted #33ccff; } ...and ...

How to dynamically import javascript and css files

i Want to import a given css or javascript file depending os some conditions, in my Servlet i have: protected void doPost(...) { if(condition) { //import some javascript or css file here } } I need this behavior since i have too many files to import and the files name may vary according to the condition. Is it possib...

Connecting repeatable and non-repeatble backgrounds without a seam

I have a 700x300 background repeating seamlessly inside of the main content-div. Now I'd like to attach a div at the bottom of the content-div, containing a different background image that isn't repeatable, connecting seamlessly with the repeatable background above it. Essentially, the non-repeatable image will look like the end piece of...

What tool can I use to test my web app in different resolutions?

Back in the past, i found a third party webpage that was able to capture and save images of my website in different resolutions and browsers. Of course i have no more that bookmark... So is there any webpage or application where i can see how my webpage looks like in different resolution? And here are the resolutions i would like to ...

How to make <dl> layout horizontally?

I'm trying to develop a layout for my website in which elements of a definition list will be laid out horizontally, kind of like this: term 1 term 2 term 3 definition 1 definition 2 definition 3 Anyone know a way to make a definition list look like this using valid CSS? Or if I can't do it...