css

CSS: Horizontal sub-menu problem

Hello, I have been trying to make the sub-menu horizontal. In my HTML it looks like this: <ul id="nav"> <li><a href="#">Home</a></li> <li><a href="#" class="selected">About Us</a> <!-- I want to make this horizontal --> <ul id="subnav"> <li><a href="#">Item 01</a></li> <li><a href="#" cl...

Javascript/CSS/PHP Hoverbox with various locations on mouseover

Hi, I'm trying to get various locations to appear on a image with mouseovers. So basically I have an image and when you hover over a link nearby a hoverbox appears at the location specified in CSS on the image. However I'm trying to get it to happen with multiple links without creating code for each CSS box. I have something like 50 li...

How to display inline several <li> with 100% width?

Hi, I have the following html: <div id="container"> <ul> <li>element 1</li> <li>element 2</li> </ul> </div> applied with a css as follows: #container { width:100%; overflow:auto; } #container ul { width: 100%; } #container li { width: 100%; } So now I would like to have an indeterminate number of elements (<li>) all wi...

CSS: background:#252 or background-color:#252? will the first cause the browser to assume the same as the second if i leave the rest out?

if for a class i include "background:#252", the browser will assume the rest of the background properties that i didn't specify. If instead I used "background-color:#252", would it cause the browser to assume the exact same about the rest of the background properties that i leave unspecified? background:#252 is shorter, but i wonder if ...

How do I add descriptive text to form link .gif ?

I want to make the descriptive text around a form link also open the form. I want to make it so you can click on "Some Text Here" (below) and open the form on somesomite.com just as if you clicked on the image below this text (somebut.gif, below) <DIV style="position: absolute; top:10px; right:10px; width:70px; height:25px"> <font color...

CSS: Setting width/height as Percentage minus pixels

Hi all, I've seen this question asked in a couple other contexts on SO, but I thought it would be worth asking again for my particular case. I'm trying to create some re-usable CSS classes for more consistency and less clutter on my site, and I'm stuck on trying to standardize one thing I use frequently. I have a container div that I d...

print css: fit in one page

Hi. In my page there's only one image. Kind of 1500x3000 px. In the printer, I need that this image's maximum width to be the width of the page, so I did: width 100% in the css, and it works. But the height... the old bullshit of height 100% will never work. Because it always will be 100% of the parent container, then someone must have...

How to make last div stretch to fill screen?

I have a site I'm trying to build and I've hit one little snag thats driving me insane. Essentially on pages without enough content to fill the viewport, I want to have the last div (my footer, fill the rest of the viewport, but it's currently being cut off. My html looks like this: <body> <div id="header"> </div> <div id="subNav"...

What are good uses of css "Content" property?

Does css "content" property break the rule of content and separation because css is for presentation not to generation content? By the way What are other good uses of css "Content" property? i've seen this only in clear fix hack. ...

CSS Hidden DIV Form Submit

Using CSS, when a link is clicked it brings up a hidden DIV that contains a form. The user will then enter information and then submit the form. I'd like the hidden DIV to remain visible, and a 'success message' to be displayed after submission. Then the user will have the option of closing the DIV. I can't get it to work without relo...

What is causing that nasty horizontal scrollbar?

I am wrapping up a few touches on a site and notice that something is forcing the horizontal scrollbar to appear way beyond the container boundaries here. I have Firebugged it to death, but still can't figure out what the offending party is. I offer quick kudos to anyone that can tell me what is wrong here. Thanks! ...

Insert javascript into local html using its CSS stylesheet?

Modifying a SnapPages theme, meaning I only have access to the CSS stylesheet. I would like to insert some javascript in the header of the site in order to use TypeKit for styling typography. Is there anyway to do that from CSS? ...

Javascript: creating div with absolute positioning

Hi, Just wondering if there's a way to position a div with absolute so that it ignores EVERYTHING else, if my site clears floats it seems divs that are created with Javascript and absolute positioning are still effected by it, is there any way to make them ignore EVERYTHING else and go exactly where I set them, regardless? ...

How to do like this list using <li> and CSS?

Hi, i want to make an stylized unordered list like the following, but i don't want it to be completely divs, i want to use the <li> & <ul> tags and maybe a div if it's necessary. Any sample code to make like this ? Thanks ...

IE 7 crashes with style position relative

Hi All, Below link code causing IE 7 to Crash when link is clicked , when googled it is saying there is bug in IE 7 DO there is any work around for this ? <a title="FAQ" style="position:relative;right:235px;top:-55px;" target="_blank" href="http://www.Google.com/ccp/index.jsp?pg_name=shared/help/page/Somahlep_FAQ_hwtp"&gt;READ OUR...

How * tag can be used in CSS?

I'm trying to understand how a background image is used in a css button. It seems the image is much larger than the button, still the corners are matched to the button (resulting a rounded corner button). It seems it is related to .btn *. I couldn't find any reference about how * can be used. Can you explain how the image is rendered in ...

How to define bold, italic using @font-face

I'm looking at the MDC page for the @font-face CSS rule, but I don't get one thing. I have separate files for bold, italic and bold + italic, how can I embed all three files in one @font-face rule? For example, if I have: @font-face { font-family: "DejaVu Sans"; src: url("./fonts/DejaVuSans.ttf") format("ttf"); } strong { fo...

Opera: How do I hide scroll bar? (not there in Firefox and IE8)

I'm testing my pages in different browsers. Opera puts a vertical scroll bar on a page. I added an overflow:hidden to the div (after trying Opera), but the scroll bar is still there. How do I get rid of it (you don't need the scroll bar to view the page). Thanks ...

Vertically and Horizontally Center Image inside a Div, if you don't know Image's Size?

If I have a fixed sized container div, and an unknown sized image, how do I horizontally and vertically center it? using pure css using JQuery if css can't do it This answer makes sense for fixed width images, but not variable ones. Something like this structure (I have in mind item renderers similar to these in the list, but where ...

CSS filters - sometimes working, sometimes not?

I'm on the verge of pulling my hair out over this. Here I have a block of perfectly functioning CSS: #admin .block.mode.off { opacity: 0.25; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=25)"; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=25); } Meanwhile... Internet Explorer 8 couldn't care less ...