css

Information on how to use margins

I need some info on how to use margins and how exactly "padding" works: For example: should I put a line to occupate the whole width of the page (no matter what resolution is used to display the web page) letting just a small border on each side, how could I put this? Thank you! ...

Is there a way to force a style to a div element which already has a style="" attribute

I'm trying to skin HTML output which I don't have control over. One of the elements is a DIV with a style="overflow: auto" attribute. Is there a way in CSS to force that DIV to use "overflow: hidden"? ...

Always have to use .css files?

Are .css files always needed? Or may I have a .css "basic" file and store other style items inside the HTML page? Does padding, borders and so on always have to be defined into a .css file stored separately, or may I use them normally into an HTML page? ...

Position An HTML Element Relative to its Container Using CSS

I'm trying to create a horizontal 100% stacked-bar graph using HTML and CSS. I'd like to create the bars using DIVs with background colors and percentage widths depending on the values I want to graph. I also want to have a grid lines to mark an arbitrary position along the graph. In my experimentation, I've already gotten the bars to s...

CSS: Display differences

What is the difference between display:block and display:inline ...

What are some excellent examples of user sign-up forms on the web?

I'm trying to get a sampling of what people think are the best sign-up forms. Good design, usability. Smart engineering. Helpful feedback. Etc. ...

What's a good book to learn Javascript DOM manipulation?

I'm looking for a book I could use to learn the subject of DOM scripting. So far I just have been learning only the things I needed for my given projects online, but I would like to buy a book on the topic so I can fully learn the material as a whole. Any suggestions? ...

Where do you put your CSS Margins?

When you want to add whitespace between HTML elements (using CSS), to which element do you attach it? I'm regularly in situations along these lines: <body> <h1>This is the heading</h1> <p>This is a paragraph</p> <h1>Here's another heading</h1> <div>This is a footer</div> </body> Now, say I wanted 1em of space between each of ...

webpage template where content takes full height of viewport if has 1 line minus footer

I am looking for a css based web page template where the main content div takes full height of the view port (minus header and footer heights) when its content has few lines. Footer should be at the bottom of the view port (instead of right below content and instead of showing in middle of viewport). Content area needs to extent vertical...

Consistent outdent of first letter with CSS?

I'm in the process of redesigning my blog. I'm trying to implement an outdent of the first letter of the first paragraph of the body text. Where I'm stuck is in getting consistent spacing between the first letter and the rest of the paragraph. Basically, the problem is that there is a huge difference in spacing between a "W" and an "I". ...

How to add some non standard font to website?

Is there any way to add some custom font on website without using images, flash or some other graphics. For example, I was working on some wedding website, and I was found a lot of nice fonts for that subject, but I can't find the right way to add that font on the server, and how to include that font with css into the html. Is this possi...

CSS list-style

Hi, I am using YUI reset/base, after the reset it sets the ul and li tags to list-style: disc outside; My markup looks like this: <div id="nav"> <ul class="links"> <li><a href="">Testing</a></li> </ul> </div> My CSS is: #nav {} #nav ul li { list-style: none; } Now that makes the small disc beside each li ...

What is the best way to replace the file browse button in html?

I know that it's possible to replace the browse button, which is generated in html, when you use input tag with type="file". I'm not sure what is the best way, so if someone has experience with this please contribute. ...

How do I pop up an image in a separate div on the mouseover of a div using only CSS?

I have a small gallery of thumbnails. When I place my mouse pointer over a thumbnail image I'd like to have a full size image pop up in a div in the top right of the screen. I've seen this done using just CSS and I'd like to go down that route rather than use javascript if possible. ...

Issues creating a box using CSS

Hi, I want to create a box shape and I am having trouble. I want the box to have a background color, and then different color inside the box. The box will then have a list of items using ul and li, and each list item will have a background of white, and the list item's background color is too stretch the entire distance of the inner box...

Is it bad design to use table tags when displaying forms in html?

I keep hearing that div tags should be used for layout purposes and not table tags. So does that also apply to form layout? I know a form layout is still a layout, but it seems like creating form layouts with divs requires more html and css. So with that in mind, should forms layouts use div tags instead? ...

How would you achieve this table based layout using CSS instead of HTML tables?

I want the following layout to appear on the screen: FieldName 1 [Field input 1] FieldName 2 is longer [Field input 2] . . . . FieldName N [Field input N] Requirements: Field names and field inputs must align on the left edges Both columns must dynamic...

How should I organize my ASP.Net themes and common CSS files

I am currently working on a project where a programmer who fancied themselves a graphic designer attempted their hand at ASP.Net themes. The CSS is pretty bad, but that is another question altogether. What I really need help with is the best way to organize ASP.Net Themes and the CSS that lies within them. Imagine that there is a direct...

How is style inherited

If I want a style to have all of the properties of the style defined in ".a .b .c" except for background-color (or some other property), how is this done? This does not seem to work. ".a .b .c { background-color: #0000FF; color: #ffffff; border: 1px solid #c0c0c0; margin-top: 4px; padding: 3px; text-align: center...

Can an element's CSS class be set via JavaScript?

I want to do this: e.className = t; Where t is the name of a style I have defined in a stylesheet. ...