css

With CSS, how do you unhighlight a link after clicking a different link?

For example, on a navigation bar, you only want one link to be hightlighted, the one that the user had most recently clicked. If a user clicks a different link, then the previously highlighted link goes back to normal. How do you do with with CSS? ...

How can I make my css :hover work?

Bellow is my css i'm using. The div with the largebutton class on it works with the exception of the hover. I would like it to change it's background color, but am not sure why its not working. Any ideas? edit - I'm working in FF at the moment. I'm not looking for support in IE6, possibly not IE7 either. .top .bottombar .largebutton { ...

mobile webapp CSS breaks on orientation change

The CSS for my webapp gets completely misaligned when the mobile device is rotated to landscape (target devices are iphone and android). I tried using the javascript solution explained here in order to get my app to switch between a portrait.css and a landscape.css file on orientation change, but that still didn't work. It even messed up...

Tahoma text doesn't look smooth

Hi, I'm using the Tahoma font for my website's logo, and it doesn't look smooth, anti-aliased, like it does in my design on GIMP. Anyone know of ways to make HTML text look better, or am I going to have to just go with an image? Also, could someone explain to me why text looks this way in HTML, and why it never seems like it looked this...

How do you change the color of the intial text in a text field using CSS?

And how do you make the text disappear when you click into the field and reappear when you click out of it? ...

display:none to display:block - How do I get the page to scroll down?

I am using javascript to change the display of a div tag with an onclick event. The div is at the bottom of the page, when and/or if needed the user can open the div. How can I get the page to scroll down when this div is changed to display:block? FYI: I have tried var objDiv = document.getElementById("the_div_id"); objDiv.scrollTop = ...

How to use a javascript value inside html style property value

Hi, I have created some div(s) on a page. Depending on the browser (or may be any other settings) I want to change the width of these div(s). Now, if I embed style=" blah blah blah...; width:200px" inside div tag, its ok. But I want this 200px to be, say, 220 sometime or 230 or 240 other times. So what I want now to calculate my requir...

mouse over popup menu

Creating a website using simple html(not html5) and css but got stock in mouseover effect. Need to show some text with background image when user mouseover a link. Following is an example.. NORMAL: OVER: I don't think it is possible to create the effect with simple CSS. My question is what is the most effective way to create the ove...

How to make Google Fonts work in IE?

I've been developing a site that uses the Google Fonts API. It's great, and supposedly has been tested in IE, but when testing in IE 8 the fonts simply don't get styled. I included the font, as Google instructs, thus: <link href="http://fonts.googleapis.com/css?family=Josefin+Sans+Std+Light" rel="stylesheet" type="text/css" /> and...

3 divs inside parent div w/o auto resize

I new to webdesign and I wonder how I could do something like this: .......................... LEFT --- CENTER ---- RIGHT .......................... Its one parent div in the center of the window, with 3 divs inside like columns. I want them to be dynamic, so they always scale to the browser window. This is how it looks now. My cur...

anchor link nested in a li

I'm creating a horizontal menu in my website and everything is OK but one thing. I have a link in each <li> and the color is set to white and li has no background, but in hover I want to set li background to white and links text color to black. The problem is that the width of <a> tags is not the same as <li> and when the mouse is over t...

My website nav menu renders badly in IE7 and below - Need your advice

I'm working on a site currently which has a simple css nav menu with css that looks like so: #nav { background: #ffffff; list-style: none; width:300px; height:100px; float:right; border-color: #600; border-width: 1px 1px 1px 1px; border-style: solid; } #nav a { color: #bf511e; text-decorat...

What's the simplest CSS change that can bring a dramatic (non-destructive) aesthetic change to a web design?

I have a web design and want to show some variations on it to some people I'm working with. What are some simple changes I quickly could make to my current CSS stylesheet to dramatically alter the design in an aesthetically pleasing way and present various alternate presentations of my current design? ...

crop text too long inside div

<div style="display:inline-block;width:100px;"> very long text </div> any way to use pure css to cut the text that is too long rather than show on next new line and only show max 100px ...

Master Page Help

Hello, I am sort of new to the whole html and css scene! All I really want to do is have a background, the content placer in the middle, and a header. An example would be this: http://img46.imageshack.us/img46/3751/38244782.png Would someone please help me do something really simple like this? Thanks ...

difference between "visibility:collapse" and "display:none"

what is the difference between "visibility:collapse" and "display:none" ...

jQuery grid recommendations for large data sets?

I was looking around for jQuery grid recommendations and came across this question/answers: http://stackoverflow.com/questions/159025/jquery-grid-recommendations In looking through the many jQuery grid solutions out there, it seems they all want to have the entire data set on the client. If I have a large data set (thousands/millions o...

Creating a stack-view control with CSS/Javascript

I Want to create a stack type control where a series of stacked sub-divs can be re-ordered within a container div. The sub-div 'views' would be the same size and absolutely positioned on top of each other. The z-index css property seems to apply z-order at the document level, which makes no sense to me- How can an element in a given d...

Difficult Jquery <div> question, need expert advice

Hey guys, I have a bit of a weird problem. I have a jquery script that basically prepends messages from data in a php script in descending chronological order one by one so that latest messages are on the top. What I want to do is somehow put a div container around two or more these messages as they come out so I decided to check which m...

Align background image to the left centered vertically

Title says it all. I have a background image that I would like centered vertically within an element, but aligned to the left of the element. what's the best way to accomplish this? ...