css

CSS - using an image along with an accent line for a paragraph heading.

A common, and good looking, typographical effect is a small image, maybe a stylized arrow, some text, and an accent line. Something like this: -> Now this paragraph --------------------------------- Where the "->" is some kind of small graphic, and the "-------" is an accent line, maybe colored. I would like to do this in css, so in a...

Help with css, making a div by default be page length

Can someone help me with the css on this page? http://www.thepatstudio.com/pat/ I have a sidebar that has a certain length with links to the rest of the page. Right next to that is an area for text and a background image. I want the whole div to be the same length as the sidebar if the text is too short, and longer with the image at the...

Pushing Down Content in Webpage

I'm floating a div to the top of the window. However, it's covering the content at the top of the page, that is, it's not pushing down the very top of the page. Yet I see Stack Overflow doing this with their notification bar, because it's not covering the username/rep/links. Is there a way I can replicated this with CSS? ...

CSS: How do I set <link media="" /> as inline CSS with @media if the media type is a phrase?

How do you set as inline if it's not one of the words listed on the single word media types? (http://www.w3.org/TR/CSS2/media.html#media-types) <link media="only screen and (max-device-width:480px)" href="iphone.css" type="text/css" rel="stylesheet" /> The handheld media type is ignored by the iPhone, but I'd imagine the external cal...

Stretch nested div to height of container div when container has height:auto?

I have a container div and two nested divs within. I do not have control over the content of either of these nested divs. What I essentially need is to make the two nested divs always have the same height. I figured this can be achieved by giving the container div height:auto so that it would stretch its own height to the tallest of the...

Elements with nowrap get stuck to adjacent elements in WebKit

I have a ul list that I display as a horizontal menu. I'd like the content of each li to remain on one line, but the entire li items to jump lines as necessary. Something like: First entry in the menu Second menu entry These words are short, the LI jumps lines, but doesn't wrap Yet anoter] [And more] [Some more] Logically, I'd just pu...

Absolute positioning of form elements in HTML

I am writing a C++ program which allows a user to design a form and then to generate the corresponding web form. Basically, the user gets an IDE something like Delphi, Visual Basic, etc and can position text labels, input fields, radio buttons, etc He can resize, rearrange and, when he is satisified, he instructs my program to generate ...

Suppose I have this loop in Django...how do I display this?

{% for p in profiles %} <div class="result"> {{ p.first_name }} </div> {% endfor %} Suppose I have 1000 of these, in a huge list. How would I make this code appear every 15 times? <div class="menu">abc</div> ...

what is the difference between using [align:center] and [margin: 0 auto] to center an element in css?

i have read in a lot of places to center the elements ( a div for example) using margin:0 auto. but why not use align:center? i think it seems more natural to use the later. also will the alignment using margin work verticaly too ? thanks ...

ie6 bug, text cropped inside div

i have this this simple div : <div id="error_message">Some bad things happened here, sorry... try again later!</div> and this css: #error_message { width:170px; height:44px; color:green; font-size:15px; margin-left:10px; text-align:center; } ok, as i expected ie6 kicks my butt again :D so what it does ...

Fluid Columns with matching height and background image

I'm working on a new layout for my site that uses a header, footer and two column center region. The two columns consist of the main content area which is fluid height and width and a right sidebar which is fluid height and fixed width. I have done similar layouts before, but this one depends on using two different background images (o...

Making an half-disappeared element in CSS visible...

I've been trying many techniques.. but none helped. I tried "margin-bottom: 1em", "bottom: 2em", etc. but the element stays nearly invisible. See the bottom of the page.. there is a sentence, which is used to be shown.. Here's the URI: http://Sulayman.org/ Can anyone help me? - Thanks! ...

having trouble position relative when before is a height auto

i have a div that i use as a container to fit in footer stuff #footcompatible { width:985px; height:50px; display:block; position:relative; left:0; top:0; <--- FIXED changed to top = 50px (the height) and added bottom -50px} here is some HTML on the master page: <asp:ContentPlaceHolder ID="MainContent" runat="server" /> ...

How do we use display:table-cell?

I have a div with float:right (no position property declared). This div has some text content which may be wrapped sometimes. I want the text to always be vertically centered. Declaring display:table-cell and vertical-align:middle for this div does not work at all. Can somebody point me in the right direction about table-cell? I am usin...

Parts of background-image visible when using border-radius

Using the code below, both Chrome and Opera (latest versions supporting border-radius) on Mac show a small blue area outside the rounded corners (which seems to a part of the defined background-image). Why? <!doctype html> <head> <title>Testcase for rounded corners on submit button with bg-image</title> <style type="text/css"> ...

How to display only text enclosed within a certain span tag using css

Please, have a look at the html below. The first sentence is enclosed by a span tag with the class "highlight". <p><span class="highlight">The Document Object Model (DOM) is a programming interface for HTML and XML documents.</span> It provides a structured representation of the document and it defines a way that the structure can be ac...

JQuery Change Background Color of 'Option' Element

Hello everyone, I'm in a bit of a rut, i've searched high and low for a JQuery method to change the background color of an item in a drop-down menu (<select><option>foo 1</option><option>foo 2</option></select>) on hover. How am i supposed to do this? ...

Why is my content always being shifted to the left within a div?

Hi. Based on this tutorial at: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/ Can anyone pls assist as to why my content always shifts to the left and doesn't stay centered? By this I mean the whole content div starts from the leftmost side of the browser window and then returns ba...

Absolute element inheriting relative parent div's width

I am trying to position a gradient over an inline / inline-block anchor link, and have that gradient inherit the width of that parent anchor. The problem is that the span either inherits the entire width of the anchor's parent, or just the width of the &nbsp;. I am unable to get the span element to properly inherit the width while mainta...

CSS only working in visual studio designer

I'm working on a Web Application in Visual Studio 2008. For some reason the CSS only works properly inside visual studio. I can see the CSS inside the design view of the page. When I view the page on localhost the CSS is not being applied. This is just a very simple sample that I am working with. Only 2 pages, a master page, and a defaul...