css

User selected CSS stylesheet in Rails

I'm working on a site in Rails and I'd like for the user to be able to change the CSS stylesheet to either a light or dark theme. I have this in my view so that I can use a variable for the stylesheet: <%= stylesheet_link_tag @current_stylesheet %> I tried to change that variable by having a link in my view something like this: <%...

css3: change font size ratio

hi all, i'm just trying out the new font-face feature in css3 for implementing own ttf/otf fonts. my question: is it possible to change the default font size ratio? example: i'm using tahoma with 9pt as default font and want to implement ownfont.ttf - the problem: if the browser supports @font-face, the ownfont.ttf with 9pt is much smal...

CSS sometimes does not load properly on initial load

Sometimes the header of my website does not form properly when I first load a page. Incorrect: In the screenshot below the headings are inside the black horizontal line After refreshing the page, there is space below the headings: This issue has been seen on several pages, not just the one I have taken a screenshot of (http://...

globally style all html buttons only without requiring a 'class','id' or 'name'

The following styles all input tags, which means any 'type' of input tag gets styled. input { color:#050; font: bold 84% 'trebuchet ms',helvetica,sans-serif; background-color:#ffffff; border:1px solid; border-color: #696 #363 #363 #696; } how do I isolate it so all button input 'types' are styled differently than text input 'typ...

An Inline element has more than 2 lines (one within the other)

I couldn't set inline elements background like this: My code is this: #divMansetKategoriHaberleriContainer { background-color: Transparent; margin-top: 4px; font-size: 12px; } .divKategoriHaberItem { float: left; background-color: White; width: 324px; height: 126px; margin: 0; padding: 0; } .divKat...

How do i fix my HTML Menu (simple menu misbehaving in WebKit browsers)

Hiya all, I'm placing this question here because i'm becoming a little desperate to fix this problem that has really puzzled me now as i can't see a reason for it. You can see the top navigation that reads "Home, play golf...etc" at the top of this page: http://urbangolf.mammalworld.com/golf-club-fitting/half-day It seems to work co...

How to split a div into two columns as we split a table ?

I actually wanted the two grids in one div , I mean one grid in right, other in the left .....but for now the grid is appearing down. Its same as you split in a table with two rows !! same as that I need to split a div and add two grids side by side . Hope you get my point . Thanking you all in advance for your awesome support and replie...

Multiple background colors for css nested divs

Alright. This is the situation. I have created a website with a black banner at the top with a logo, its height is 100px and its background color is #000. Next I want a large "main_content" div to encompass the navigation along with any content within the page, so it would not include the footer. In this case there are several nested...

How to include a separator image on a menu built with ul and li?

I am trying to include a small image as a separator in my menu and I am having the time of my life (sarcasm). In order to create a menu like below I am using the code under the image. <ul id="div-menu"> <li class="current"> <div class="menu-fill fill"> <div class="menu-left left"> <div class=...

div styles in html page

All, How to make the div more presentable in the below code. i.e, on mouseover the div should look like as same as title attribute or even better And the text on it should also look presentable <style type="text/css"> #div1 { width: 200px; height: 30px; background-color: #a9a9a9; color: #fff; position: absolute; } </style> <script sr...

Templating Html.DisplayFor() in ASP.NET MVC 2

It appears that if you just use Html.DisplayFor(model => model) with no templates for a Details view, the resulting markup will look something like this: <div class="display-label">first name</div> <div class="display-field">Dan</div> <div class="display-label">last name</div> <div class="display-field">M</div> <div class="display-label...

Create a php menu that highlights current tab

So I have a menu in a php file that looks like this (This is the whole file. I'm totally new to PHP.) menu.php: <li id="current"><a href="#"><span>Home</span></a></li> <li><a href="http://blog.me.net/"&gt;&lt;span&gt;Blog&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; <li><a href="http://www.me.net/R"&gt;&lt;span&gt;Results&lt;/span&gt;&lt;/a&gt;...

How can I set vertical-align to all cells in a table by setting the table element's style?

I would like to have all cells in a with "vertical-align:top" style. For technical reasons outside my control, I cannot define a new class, or change the stylesheet at all; nor can I set "style" for individual cells, or even rows. All I can do is set the "style" attribute of the <table> element itself. Using <table style="vertical-alig...

Website Background Image - How?

Hi, Have a query based on the following CSS and HTML code (see below) I have a background image that spans the whole browser page (left to right), which is not what I'm after. How can I get the background image to stay within the boundaries of my main content canvas, i.e.centered 850x600px and anything outside just be white? Thanks. ...

Why doesn't this small HTML/CSS snippet produce the expected results in IE?

You can save the code below and try it out. In firefox,it's full browser grey,but in IE(IE7 to be exact),it's not working. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <style text="text/css"> .overlay { ...

Why doesn't Chrome render this page correctly?

I'm having issues with this page in Chrome: http://www.pieterdedecker.be/index.htm For those of you that don't have Chrome, here's what happens: How can I fix this glitch? ...

Trouble in river city with CSS

Ok here is the site: http://danberinger.com/ If you view the source for the HTML and CSS you can see that I have set the height of the div in the middle to 100% and given it an overflow property value of hidden, it is called "main_content". I realized that the height value is having no effect on what is displayed, the overflow value o...

Is it possible to set 3 backgrounds in one DIV ?

Hi, i want to do a rounded corners DIV ( only top left and right rounded corners ) and i want to set 3 backgrounds in one DIV by playing with background position. i have 3 images : 1) leftcorner.png 2) rightcorner.png 3) internalfill.png Is that possible ? if not how i can do it using multiple divs ? Thanks ...

How to automatically fill the space between header and footer with google map?

Hi, I would like to create a webpage with header, footer, left column (25% wide column which contains some buttons etc.) and main content area which has to be filled with google map. I tried to modify the content from this answer the following way: <body onload="initialize()"> <div id="wrapper"> <div id="header">Header</div> <div ...

Positioning a div relative to mouse scroll position

All, On some mouse over, div1 is displayed.How to display the div next to the mouse pointer so that even mouseover at the end of the context the div should show up next to the mouse pointer. <style type="text/css"> #div1 { width: 200px; height: 30px; background-color: #a9a9a9; color: #fff; position: absolute; } </style> <script src="jq...