css

dangers to user css

Are there any dangers or security risks in allowing user css? Sorry for unspecific question. Possible implementation: having a textarea for users to input custom css, and then taking that css and putting it into a style element: <style type="text/css"></style> with js. ...

CSS Minifier that doesn't just strip whitespace?

Almost all the CSS minifiers I can find are basically regexes that strip whitespace. Are there any CSS minifiers that are a little smarter about it? like merging selectors/properties that are similar, etc? ...

how to create proportional image height/width

So, I want to have an image resized to 30% of its original height/width. Pretend you don't know its height or width, how would you go about it using only CSS/HTML? ...

Using css div tables -widely supported yet?

Hi, I'm using a table element in my page layout (because I can't get divs to work 100% the way I want). I just read this article about using a table style for divs: http://www.digital-web.com/articles/everything_you_know_about_CSS_Is_wrong/ is this widely supported right now, is anyone using this method? If I look at major sites like...

Firefox contentEditable div focus issues

Hello, I am using contentEditable div tags on my website and I have noticed a weird issue when using Firefox. Here is example source code: <html> <head> </head> <body> <div contentEditable="true" style="margin-left:auto; margin-right:auto; height:200px; width:200px; border-style:solid; border-color:black...

Divs with floating image not lining up corrently

I put together a simple system so that my dad can manage a website for his club volleyball team. He's not very familiar with html markups so I'm trying to keep this as simple as possible for him. Here is what I have him right now: <div class="text_block"> <h2>section heading</h2> <image src="" /> <- optional image <p> </p...

auto-resize images in posts with link to image URL?

This will be used in my community website (forum, articles) where some users post very large image. I can auto-resize the images using below codes #post img { max-height: 1000px; max-width: 700px; } But one more, I want (on every resized image) a link created to that image URL. So when visitor click the link, they can see the...

Relative paths not working when I put WAMP in "Put Online" mode

I have installed the WAMP server on my local machine, and would like to use it in "Put Online" mode to share the work with clients. I have it working with the IP address, but when I click on a PHP file in the localhost, the basic HTML displays, but the CSS doesn't seem to work. The CSS is connected through a relative path, but it won't...

Overlapping text decorations

<span id="case1" class="comment>text text</span> <span id="case2" class="suggestion">suggestion</span> <span id="case3" class="comment>text text <span class="suggestion">suggestion suggestion</span> text text</span> I would like span.comment to have a dotted red underline, span.suggestion to have a dotted yellow underline and span with...

Why does graphics have ugly black borders in IE after alpha animation?

The site I'm working on opens with a fancy jQuery opacity animation. Currently It's working in all browsers, but in IE all text and alpha images are left with ugly black borders that makes the text practically unreadable. Is there some clever javascript command i can run to refresh/update the graphics? Any other way to fix this? My pro...

Styling <BR> to have margins like <P>

I want to style my <BR> elements to have margins more like <P> elements. How can I do that? ...

overlapping divs based on width of floating containment div

i have a bunch of divs that are representing cards in a hand. depending on how many are drawn, i want to be able to have them start to stack on top of each other so that the hand container div is only one row deep. the card divs are also set up as draggables so this is kind of me trying to figure out a way to auto sort them. would usi...

Which is better practice in CSS - single generic selector in multiple locations or multiple specific selectors?

Hi all, Which is better practice? .listing { some attributes:some values;} applied to multiple locations (e.g. search results, category listing) or .search-list, .category-list, .other-list { some attributes:some values;} It seems to me that the second option provides more flexibility for future changes to style without chan...

In how many ways a website can be accessed and should we consider all condition?

As far as i know a website can be accessed on Desktop Browser Text only browser Mobile phone browser PSP Iphone/ipad touch screen and conditions JavaScript disabled CSS disabled JavaScript and CSS both disabled images disabled with screen reader and keyboard with keyboard only with keyboard and mouse combination. Color Monitor B&W ...

Link is not clickable in IE7

Hi all, I have some basic hyperlinks (they're tags dynamically generated by Wordpress). Here's the code that generates them: <p><?php the_tags('Tags: ', ', ', '<br />'); ?></p> Everything works in all modern browsers (including IE8). However, in IE7, it looks the same, the link is THERE, with all of the properties EXCEPT the hyperli...

css Relative And Absolute Positioning Problem

hi my dear friends: i am looking for a way for overlapping a table on another , but with a condition. when u change the browser's size or u change the screen resolution so every positioning should be fine. i test absolute positioning (z-index and top and left) but when u change the browser's size or u change the screen resolution the ...

How come my <textarea> is not centered when it parents are centered with 'margin: 0 auto' ?

For some reason my textarea DIV is not inheriting margin: 0 auto from its parent: * { padding: 0; margin: 0 auto; } Here is a link to my CSS & HTML for this example How can I make it so that the textarea DIV actually gets centered? ...

How to center a block element without knowing its width?

The code below works fine at 1280x800, however, if I add another thumbnail, the width of the <ul> becomes equal to the <body> width and <ul> isn't centered anymore. I don't want to specify the <ul> width, which would solve the problem. I want thumbnails to occupy all free space regardless of resolution, but at the same time having equal ...

how to fix the size of password input field?

my html code is <tr> <td>User ID:</td> <td><input type="text" id="uid" size="20"></td> </tr> <tr> <td>Password:</td> <td><input type="password" id="pass" size="20"></td> </tr> <tr> but the problem is, password textbox length...

<pre> in fieldset doesn't respect the "overflow: auto" directive

This is a test case: <!doctype html> <html> <body> <div style="margin: 0 auto; width: 950px; overflow: hidden;"> <div style="float: left; width: 660px"> <form><fieldset> <pre style="overflow: auto">Test test test Test test test Test test test Test test test Test test test Test test test Test test test...