css

How to resize a div proportionally to the text inside?

Suppose that we have a div element with zero padding, absolute positioning, predefined width (in pixels) and some plain text inside. Now, we increase the CSS font-size property of the text by one pixel. By what measure should I increase the width of the div so that its layout remains the same (i.e. no words jump from one line to another...

CSS Issue - ASP.NET Calendar picker

EDIT With one of the below answers, I was able to correct this issue for the rendering within a table. I'm still seeing this issue within my ListViews. I've tried this CSS for the ListView, but it has not corrected the issue. /* FIX FOR CALENDAR IN TABLE */ .DateTime_Edit { white-space: nowrap; } .DateTime_Edit table { border:...

CSS & Overriding Styles on Nested Elements

This came up from another question that was asked here but I figure it's something that probably has a "Best Practice" Approach. When designing a website, the designer will most likely put together a set of generic styles for all elements within a website. (Standard Fonts for Text in Divs/Spans/H1/H2s) In the case of tables, they may b...

Div Width Problem

What keeps a div from extending horizontally past the edge of the screen when there are horizontal scroll bars? The DIV's content will overflow out to the left but not the DIV itself. What can make the div go all the way to the right? Thanks ...

IE display transparency bug on height > 4096px?

I was working on a JavaScript dialog with a transparent background overlay when I ran into a problem on large pages. If the page was large, the transparent overlay would be a solid colour (i.e. no longer transparent). I did some testing and found this only happened in the overlay was greater than 4096 pixels high (hmmm, suspicious, that...

is it worth the effort to try and override the default classes in DNN

DotNetNuke uses quite a few preset classes like .Normal, .Head, .SubHead, etc. in spans inside other classless spans etc. that I find really annoying and rather than figuring out how to work with them I'm considering overriding them by having them all inherit their styles from their parent, but I'm curious if others have already given th...

how to hide the content of the div in css

I have this html code <div id="mybox"> aaaaaaa </div> and this is my css #mybox{ background-color:green; } #mybox:hover{ background-color:red; } the question is how to hide the content of the div (aaaaaaa) when the mouse hover event by using css only and without changing the structure of the code I think I should put some c...

Blackberry Font-Family

I am currently making a mobile version of our application and I am trying to find a resource that lists out what fonts the Blackberry devices support. I search around on the Blackberry development site and forums but have not had much luck. So far, any font I specify using CSS does not appear to be working, so any help would be appreci...

How do i make an area unclickable with CSS?

Let's say if I have wrapper div which includes some links and images, is there any way I can deactivate it at once with CSS only? // after review of answers I dropped the idea that can make it with CSS only. jQuery blockUI plug in works like charm. Thanks a lot. ...

css layout problem. margin and standard paper size

I am trying to figure out what margins are best for readability and i figure it is best to use standard paper size and margins. I looked it up and its seems like 8.5 is standard. I looked up how to do basic CSS and hit a problem margin-left: 1.5in; margin-right: 8.0in; I was excepting the left will start from 1.5 of the left side as w...

Long Line in HTML Table tanting the layout of other lines

I have a html table serving as layout for a page (Bad practice I know). This table goes something like this: Label1 Value1 Label2 Value2 Label3 Value3 Label4 Value4a Value4b Value4c Value4d I just added a validation error message that can be quite big to line one, so now it is: Label1 Value1 ErrorMessage Labe...

How do i space my menu from my text

How do i have a space between my menu header and my body of text? Also is this good practice? div.body { width: 6.5in; margin:0px auto; text-align:left; } .menu ul{ margin:0px auto; } .menu li{ width: 25%; text-align:center; display:block; float:left; } .menu a{ display:block; } html: ...

FireFox stuck on "waiting for" or "transferring data from"

I have a website that includes a button which is CSS-styled to show a distinct image on hover. I wait for the page to load completely, then move my mouse over that button. Firefox will show the new image, but the status bar becomes stuck showing either "transferring data from www.server.com" or "waiting for www.server.com" and this neve...

IE7 & 8 not fireing jQuery click events for elements appended inside a table

I have an IE bug that I'm not sure how to fix. Using jQuery I'm dynamically moving a menu to appear on an element on mouseover. My code (simplified) looks something like this: $j = jQuery.noConflict(); $j(document).ready(function() { //do something on the menu clicks $j('div.ico').click(function() { alert($j(this).parent().ht...

Text not showing up as hyperlink - CSS issue?

I can't determine why this text can't be scrolled over and the hyperlink (all in the body of the page) can't be clicked. I'm not sure if it's a CSS issue, or some other kind of issue. The XHTML is valid, but the CSS isn't totally. Wondering if I can fix without totally remedying every CSS element. http://www.writershore.com/ltlaw Tha...

How can I access the actual text that is displayed in a DIV when using CSS style overflow: hidden?

I have the following content DIV on my page, which displays dynamic text: <div id="someContent"> </div> It uses the following CSS to cut off additional text: #someContent { height: 200px; width: 200px; overflow: hidden; } If I load this text into the DIV: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praes...

How can I edit CSS on the fly with ASP.NET code?

Want to edit things like DIV size, color, positioning (absolute), height/width etc. ...

Is there an alternative to padding for IE that doesn't make the text disappear?

Is there an clean alternative that doesn't make the text disappear in the following: <div style="background-color:#ddd; padding:10px 0 50px 0;"> <ol><li>In what year were you born?</li></ol> <div><select name="c_record" size="1"> <option value="">-- Select One --</option> <option value="1">1900</option> <option value="2">190...

Dropdown menu "blinking" in IE6

Hi, I am trying to create a dropdown menu based on Stu Nicholls' : http://www.cssplay.co.uk/menus/pro_drop8.html Mine needs to go over Select dropdowns and be IE6/7 compliant, so that's why I'm using all this iFrame nonsense. Changing z-index will not fix it because IE set an infinite zindex value to select dropdowns. So my problem is...

Is it possible to specify a starting number for an ordered list with css?

Hello, I have a ordered list where I would like the initial number to be 6. I found that this was supported (now deprecated) in HTML 4.01. In this specification they say that you can specify the starting integer by using css. (instead of the start attribute) How would you specify the starting number with css? Thanks ...