css

inline-block on span

I expected the two span tags in the following sample to display next to each other, instead they display one below the other. If I set the width of the class span.right to 49% they display next to each other. I am not able to figure out why the right span is pushed down like the right span has some invisible padding/margin which makes it...

Making an iframe take vertical space

I would like to have an iframe take as much vertical space as it needs to display its content and not display a scrollbar. Is it at all possible ? Are there any workarounds? ...

How can I change the way my Drupal theme displays the front page

I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page. My question is: how can I edit the theme's css so it changes the way that block of static content is displayed? For reference, here's the link to the site (in portuguese, and with almost ze...

What is a good online resource for css 'design patterns'?

Hi, Can anyone out there recommend a good online resource for CSS 'design patterns'? I know design patterns in a software context usually refer to OO based design patterns, but I mean design patterns in the broader sense of the term: i.e. common, clean solutions to common problems / tasks. An example of such a resource would be this l...

On a two-column page, how can I grow the left div to the same height of the right div using CSS or Javascript?

I'm trying to make a two-column page using a div-based layout (no tables please!). Problem is, I can't grow the left div to match the height of the right one. My right div typically has a lot of content. Here's a paired down example of my template to illustrate the problem. <div style="float:left; width: 150px; border: 1px solid;"> ...

IE 6 CSS Hover non Anchor Tag

What is the simplest and most elegant way to simulate the hover pseudo-class for non-Anchor tags in IE6? I am specifically trying to change the cursor in this instance to that of a pointer. ...

CSS - Make divs align horizontally

Hi, I have a container div with a fixed width and height, with overflow: hidden. I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of their parent. This will happen even if the height of the parent should not allow thi...

On the web, what fonts should I use to create an equivalent experience cross-platform?

Because Linux (and its variants) have a completely different set of fonts than Windows and Mac OS X, is there anyone with any experience of creating cross-platform font families - ideally finding equivalents to the common fonts found on the aforementioned operating systems? If so, what is the best route to take? ...

Can I stop .NET eating IDs?

I'm an Information Architect and JavaScript developer by trade nowadays, but recently I've been getting back into back-end coding again. And, whilst trying to get an HTML prototype integrated and working with our C#-based CMS, I've come to blows with our programmers over the HTML ID attributes being arbitrarily rewritten by .NET for for...

Styling Html Helpers MVC.Net

If i have a html helper like so: Name:<br /> <%=Html.TextBox("txtName",20) %><br /> How do i apply a css class to it? Do i have to wrap it in a span? Or do i need to somehow utilize the HtmlAttributes property of the helper? ...

CSS: Getting image to stretch a div

How can i get an image to stretch the height of a div class? Currently it looks like this: But i would like the div to be stretched so the image fits properly. I do not want to resize the image. Here is the css for the div (the grey box) .product1 { width: 100%; padding: 5px; margin: 0px 0px 15px -5px; background: #...

How do you get the footer to stay at the bottom of a Web page?

I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. Update: It's not working properly in Firefox. I'm seeing a st...

IE6 rending UL's incorrectly

Sometimes IE6 will render the text of a UL list the same color as the background color, if you select it, they show back up, or if you scroll the page up and back down. Its obviously a rendering bug, but I was wondering if anyone knows of a workaround to make it reliable? ...

blockquote vs div

Is there any benefit in using a blockquote over a div? I was looking at a website's mark up to learn css and I couldn't figure out why the blockquote was being used. EDIT: Yeah sorry I didn't clarify, it was used to hold the div tag with username as text and an input tag. There was clearly no quote. ...

Is there a standard HTML layout with multiple CSS styles available?

When it comes to web-design, I am horrible at producing anything remotely good looking. Thankfully there are a lot of free sources for design templates. However, a problem with these designs is that they just cover a single page, and not many use cases. If you take a look at CSS Zen Gardens, they have 1 single HTML file, and can radicall...

How do I style (css) radio buttons and labels?

Given the code bellow, how do I style the radio buttons to be next to the labels and style the label of the selected radio button differently than the other labels? <div class="input radio"> <fieldset> <legend>What color is the sky?</legend> <input type="hidden" name="color" value="" id="SubmitQuestion" /> <...

Is there any easy way to determine what factors are contributing to the size of an HTML element?

For example I have a situation where I have something like this (contrived) example: <div id="outer" style="margin: auto> <div id="inner1" style="float: left">content</div> <div id="inner2" style="float: left">content</div> <div id="inner3" style="float: left">content</div> <br style="clear: both"/> </div> where there ...

Complex CSS selector for parent of active child

Is there a way to select a parent element based on the class of a child element in the class? The example that is relevant to me relating to HTML output by a nice menu plugin for http://drupal.org. The output renders like this: <ul class="menu"> <li> <a class="active">Active Page</a> </li> <li> ...

inline lists with graphical links in css

given this html: <ul id="topnav"> <li id="topnav_galleries"><a href="#">Galleries</a></li> <li id="topnav_information"><a href="#">Information</a></li> </ul> and this css: #topnav_galleries a, #topnav_information a { background-repeat: no-repeat; text-indent: -9000px; padding: 0; margin: 0 0; overflow: hidden; height: 4...

What is the best technique for consistent form, function between all web browsers (including Google Chrome)?

Short version: What is the cleanest and most maintainable technique for consistant presentation and AJAX function across all browsers used by both web developers and web developers' end-users? IE 6, 7, 8 Firefox 2, 3 Safari Google Chrome Opera Long version: I wrote a web app aimed at other web developers. I want my app to support the...