css

Why is this <p> expanding the whole page?

If you visit this page and shrink your browser window, you will see my problem. [If you want to open the page in a new window, just hold down shift when you click the link.] The answers to the question extend beyond the page margin instead of wrapping. I have spent the last half hour working with Chrome's Inspector and Firefox's DOM in...

How to create custom CSS "on the fly" based on account settings in a Django site?

So I'm writing a Django based website that allows users select a color scheme through an administration interface. I already have middleware/context processors that links the current request (based on domain) to the account. My question is how to dynamically serve the CSS with the account's custom color scheme. I see two options: A...

How to force a line break in a loooooong word in a DIV?

Okay, this is really confusing me. I have some content inside of a div like so: <div style="background-color: green; width: 200px; height: 300px;"> Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest. </div> However, the content overflows the DIV (as expected) because the 'word' is too long. How can I force the ...

expand floating object when floating object within expands

Hey guys, quick question, I have a link when clicked drops down a list. This list is floated to the right to position it properly. This list is in another box that has been floated. My problem is that when the list expands, the box does not and the list comes out of the container box, unless the list is not floated. However floating it s...

Aligning data in a table

In the following table, how do I align the data in td cells such that we do not get a horizontal scroll bar, using CSS? Also the requirement is that the height of the table should be adjusted automatically.. <table> <tr><th>name</th> <th>info</th></tr> <tr><td>Harry</td> <td>suminfosuminfosuminfosuminfosum infosuminfosum...

Creating a fixed background for a website

Hello all I am trying to implement a fixed background for a website like one over here. Searching around for it told me that I can use background: fixed or background-attachment properties for this. My problem is the image which will be used as background. I am thinking about following issues: What should be image size? how will it r...

How to make an input element with 5px fill an entire <td>?

I have a text input inside a <td> that has a padding of 5px; When setting its width to 100% it comes out of the boundaries of the <td> for 10px. Is there a way to make it fill the entire <td> (i.e. in practice its width should become 100% - 10px) without using JavaScript? Thanks in advance ...

When to use <strong> and when to use <b>?

Possible Duplicate: Is it ok to use <strong> in place of <b> blindly ? When to use <strong> and when to use <b> or other ways to give look of bold? strong has semantic value ( and useful for screen reader while b is presentation (and even valid in HTML 5). my question is not what is the difference between strong and b. The q...

Dynamic CSS Background URLs

Consider this CSS Property: background: url(http://images.something.com/background.png) left top repeat-x; Is there a way to dynamically specify the URL being used in the external file (Meaning the URL is sort of automatically generated rather than hard-coded in the CSS file) ? Thanks. ...

How to disable default vertical scroll bar that comes in IE 7?

I can see a vertical scroll bar without scroll when I open my IE 7. I is not so weird to see but it is not obeying my web page rules. I cannot see this kind of strange behavior in any other browser. ...

Ignoring unclosed tags from another <div>?

I have a website where members can input text using a limited subset of HTML. When a page is displayed that contains a user's text, if they have any unclosed tags, the formatting "bleeds" across into the next area. For example, if the user entered: Hi, my name is <b>John Then, the rest of the page will be bold. Ideally, there'd be ...

2 Minute question - HTML / CSS If div within div expands expand parent div

I have a setup lets say like follows: <div id="nav"> <div id="innernav"> //With dynamic content here. </div> </div> I am running a script that sizes #nav to the size of the browser window in height. But sometimes my dynamic content is now getting bigger than the height of the window.. Is there a way I can enforce that when...

inconsistency in rendering fonts between Firefox/Win and Safari/(Windows and Mac)

I have a css definition in the head of my page as follows: @font-face { font-family: "ownfont";src: url("../fonts/ownfont.ttf"); } Then i give a css class to the body (on button click) which changes the font type from: font-family: Verdana,Arial,Helvetica,sans-serif; to font-family: "ownfont",Verdana,Arial,Helvetica,sans-serif...

How well do you need to know HTML before delving into CSS?

Is knowledge of HTML beyond the basics a prerequisite for learning CSS? I am making a learning plan so this will help me evaluate the time required better. ...

CSS styles in Silverlight

I know styling is possible in SL, but I have a large web app that has both HTML and SL so it would be really useful if they could use the same style sheet... Is it possible? Thanks. ...

Difference b/w padding and margin

what are the differences between margin and padding. Thanx ...

Any generic CSS libraries for web development?

Hello I'm working on a web development project where i need to take care of the design and working of the application. I found it very hard to style my UI which should be compatible will all the prominent browsers. For example to align the text inside a div i gave text-align:center which worked only in IE and not in Firefox, Safari...

prevent CKEDITOR from adding image dimensions as a style

Hello, In ckeditor: Is there a way to get the width and height attributes instead of css style attribute for the image dimensions? greetings David ...

css sprite navigation

Is it possible to use three images in CSS sprite navigation? This may be like this If its possible what will be the result? ...

Need CSS guru to help , how to style list items (with same class) individually.

Hi all , please help me to style this list , I need to set different background image for each list item, but class are same. <ul> <li class="sameforall">menu 1</li> <li class="sameforall">menu 2</li> <li class="sameforall">menu 3</li> <li class="sameforall">menu 4</li> </ul> I know this one , but it works only for fist item :( ul:fi...