css

Vertically align text inside an element with a percentage height?

As I have an element with a percentage height I can't use the line-height hack. Does anyone have any ideas on how to solve this? <div height="100%"> I want to be vertically aligned in the middle </div> ...

Fixing CSS of profile page on my site (logged out view)

Hi! Please help me to fix the CSS error in profile on my site (IE). Steps to reproduce: Go to the of profile http://j-in.org.ua:9000/account/profile/oleg The username in red box is displayed on the middle of the page. and should be on the top of the page. ...

why the class margin not work?

The code is as below: <html> <head> <title>test</title> </head> <body> <div><span>shanghai</span><span class="margin"> </span><span>male</span></div> </body> </html> .margin { width:40px; height:auto; } ...

Is there a elegant way to implement selectable tabs/menus in ASP.net

I am struggling to find a way of implementing a tab style menu system in ASP.net. The tabs look great from the HTML/CSS standpoint and are implemeted in the Master page so I don't have access to the body tag from the content page. what I am trying to work out is how to vary the "active tab" based upon the page the user is accessing. I c...

Mentioning the HTML TAG element before a CLASS or ID (Good or unnecesary CSS practice?)

Basically, I want to know what is best to avoid future problems and confusions with CSS code... Naming CSS proprieties like this: div#content ul#navigation div.float-left (Its really unnecessary to do this?) or just #content #navigation .float-left I don't have experience with big projects so I wish someone could tell me which ...

Why doesn't the following Javascript code (to set CSS style) work?

I'm trying to set the CSS style of an object with the following: document.getElementById(obj).style='font-weight:bold; color:#333;'; but it's not working. Does anyone have any idea why? ...

HTML TD wrap text

Hi, I want to wrap a text that is added to the TD. I have tried with style="word-wrap: break-word;" width="15%". But the wrap is not happening. Is it mandatory to give 100% width ? But I have got other controls to display so only 15% width available. Need help. TIA. ...

Using UL in place of DIVS - recommended, where to use 1 or the other?

Hi there, been experimenting with unordered list UL and i have seem varios examples of using them in place of divs.. So i a bit confused, when should i use divs and ul.. for example if i have a 3 column layout then i presume i used divs here, although i can use UL Also on the right column i have lots of formatting to do, the idea was...

why TDs display within a TR displays in the same line ?

TD is a block element, but displays like inline,say,several TDs within a TR display in the same line, why? ...

HTML blank I want to erase...

Hello everyone there! I have a new problem that bugs me ... I am making a web page that I want to be fixed with no scrolling and most important I want my main Div to fill aaaaaaaaall my available space... I made this code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&g...

remove CSS Link / update paths with jquery/javsscript? (Design time CSS)

Hi there, does anyone know if its possible to remove a css link at run time... Basically i have partial HTM files in a directory so hence if i add a css link (so i can use my design time editor) then this link isn't valid at runtime and i don't need it as my CSS is in another file. I just want to be able to strip it out when i load it ...

How to keep an unordered list centered within the screen??

I have the following unordered list within a div: <div id="footer"> <ul> <li>Blog</li> <li>|</li> <li>About Us</li> <li>|</li> <li>Privacy Policy</li> <li>|</li> <li>Copyright</li> <li>|</li> <li>Contact Us</li> <li>|</li> <li>Press Inquiries</li> </ul> </div> I want this footer text to stay centered i...

Where do you put CSS files in a rails app directory?

Where should i create a folder to house my CSS files within my rails app directory?? ...

CSS - Amazon "Quick Linker" link format

Hello, For my site, I had a link black-colored with no underline, then with an underline when hovered. I turned this link into an Amazon "Quick Linker" link, and then it turned blue with an underline. Someone on Stackoverflow told me to add !important to the CSS, but that didn't change the link format. Any idea how I could turn this l...

Simple HTML that comes out looking way off?

I cannot for the life of me figure out why my table is turning out this way. The images and text should be lined up: HTML: <div id="items"> <div class="category"><h1>Apparel</h1></div> <div class="list-product"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="50" align="center" style="p...

How do I use the not() syntax in a CSS selector?

Are there any resources on how do I use the not() syntax in a CSS selector? Such as: .container[orient="landscape"] > *:not(.toolbar) If so can you please answer with a link or explanation? ...

Pre-loading external files (CSS, JavaScript) for other pages

I'm curious if there is an efficient way to wait for the front page of a site to load, and then pre-load CSS and script files that I know will likely be needed for the other pages on the site. I want the front page of the site to be as fast as possible (lean and mean). It's likely that the user will not immediately click on a link. Sinc...

Making website compatible across most browsers

I am trying to figure out the most efficient way to ensure cross-browser compatibility. I have done a bit of research and learned a few interesting things such as the fact that Mozilla/Firefox can't handle a class that has a name starting with a number. Is there a way to make a CSS work for any browser or is it better to just develop mu...

How to make last cell of a row in a table occupy all remaining width

Hi, In the below HTML fragment, how can I make the width of a column that contains 'LAST' occupy the remainder of the row, and widths of columns that contain 'COLUMN ONE' and 'COLUMN TWO' be just wide enough to contain their content, and not larger. Thank you <html><head> <style type="text/css"> table { border-collapse: collapse; }...

Linux Firefox Spaces Things Differently

I am having trouble with Linux spacing of things, in multiple APIs. Thoughts? On the linked page below, there is a button with a magnifying glass on the map - in the upper left corner - directly to the right of the Home Map button. In Firefox 3 on Linux, this button appears to be on top of the Home Map button. On a Mac or Windows machi...