css

Text-Indent vs Position for SEO

What's the best way to hide a text element and replace it with an image while still maintaining good SEO. I've seen negative text-indent, but I prefer absolute positioning with negative top. So what I'd like to know is which is better for SEO. Do most search engines consider text elements with negative top with absolute positioning; lik...

Can I create a Mac like menu in CSS 3?

See the menu where it says Home. Can this menu bar be replicated using CSS 3 only? ...

When does order of HTML elements matter?

I have a line of text that I'm wanting to position a small graphic next to, within a full screen liquid layout. I have it working, but I'm not sure why. The html: <div class="wrapper"> <div class="image_container"> <img src="some_valid_url"> </div> <div class="text">Zachary</div> </div> The CSS (written in sass, if you're c...

Is that possible to do the same (hover effect) without Javascript (only CSS) ?

I'm trying to create a button with icon like this: HTML: <div id='button'> <div class='icon'></div> <span>Send Email</span> </div> CSS: #button { width: 270px; height: 50px; font-size: 1.4em; color: #333; background-color: #555; position: relative; } #button > .icon { width: 61px; height: 39px...

What is "content loaded as chrome?"

-moz-user-select Controls the appearance (only) of selection. This does not have any affect on actual selection operation. This doesn't have any effect on content loaded as chrome, except in textboxes. Source: link text I know what -moz-user-select does, but what is "content loaded as chrome?" Thanks ...

Shorten the comma separated CSS selectors

Hi all Maybe the title of this question is ambiguous, what I really mean is: #footer_list li a:link, #footer_list li a:visited { blah balh blah } Is there a shortcut for the two elements in CSS? so the CSS selectors can be shortened ...

Jquery - Change the complete CSS (intern)

Hi, i try to change the complete CSS code (like a stylebrowser). First solution new_css = ' body {color:#00ff00; } #div { border: 1px solid red; }'; $("head > style:eq(1)").html(new_css); It works fine in the FF, Chrome & Safari ... but not in the the IE. My second solution var myStyle = document.styleSheets[1]; if( myStyle.cssRu...

@font-face for all fonts on a website

It seems as though the use of custom fonts on webpages is becoming increasingly common. With services like TypeKit, there is a also an increasing selection of high-quality fonts to work with. I'm wondering: Has anyone started building sites that use @font-face fonts exclusively? (Can I finally get rid of Verdana / arial and swap in M...

CSS / JQuery - Filtering Table Rows and Inverting the Selection

Hi, I have a table with a number of rows, I then want to highlight the rows that contain value x and then invert the selection. So far I am able to select the rows that contains the filter value but inverting it is giving me problems. First I am selecting the rows that match my search value and add a class name: var rows = $("#table ...

css() with appendTo() is not applicable

$('#item').click(function() { $.ajax({ url: 'server.php', type: 'POST', data : {temp : 'aValue'}, success: function(data) { $(data).css('color', 'red').appendTo('#item'); } }); }); The problem is here : $(data).css('color', 'red').appendT...

Rollover on 'layered' element... possible?

How would I do the following, preferably just using CSS (but possibly jquery too) and PHP. I have a div area, button_background, which has a background image. Inside that div is an A tag, which has a background that overlays the div's background. (it's a semi-transparent 'play' triangle png which overlays a still from a video). I would ...

How can I set fadein and fadeout sildeshow of images in JQuery continusly without any event?

How can I set simple JQuery slideshow with CSS continuously, without any event like mouse hover, click etc.? ...

What's the difference between .show() and .css({'display':'block'}) ?

I just got a script to work by changing $('#thisElement').show(); to $('#thisElement').css({'display':'block'}); where #thisElement had been loaded as having display:none; Is there a fundamental difference in these two expressions? ...

How to set font family in HTML

<font font-family="ravie" >Articles</font></h2> but this is not working? ...

FIrefox / Safari Not Firing Mouse Over Event to show a div over another div using css class switch

Hello, I have a div that, when the mouse over event occurs should fire some javascript to change the class of a div floating over it to visible. The code works fine in IE (8) but not firefox, chrome or safari. I've attached a demo sample below: <div class="videoImagePlaceHolder"> <div class="vi...

Is there a way to use CSS3 gradients and fallback to a PNG?

Hi, How would one use CSS3 gradients for a background image, and fallback to a PNG image if the gradients were not supported? ...

jquery - scrolling the background

What I wanted to achieve is a logo with png transparency and the background which automatically scrolls down so it gives an effect like it's made in flash. I used jquery.backgroundPosition.js plugin, which enables background scrolling. The code: HTML <div id="logo"> <h1><img src="img/logo.png" alt="The logo" width="420px" height="...

a box appear next to an li element

i have a box : #box1 { height:100px; width:208px; } and a list <li id="first"><strong>FIRST</strong> </li> <li id="second"><strong>SECOND</strong> </li> <li id="third"><strong>THIRD</strong> </li> <li id="fourth"><strong>FOURTH</strong> </li> with jquery i can make the box appear when i cl...

margin does not push down another margin, css

I have a series of elements like this: <h1>...</h1> <p>.......</p> <h1>...</h1> <p>.......</p> etc. etc. I have a 5px top margin on h1, and 10px bottom margin on p. But the resulting margin is only 10px. If I increase the bottom margin to 50px and the top margin to 40px the total margin will only be 50px. It will be whatever the bigge...

Fixed-width HTML table with scrolling column group – is it possible?

A friend of mine asked me a question that I couldn't answer or figure out yet. The problem is: he wants to make an HTML table having width of 100% and many columns, of which the first one (or two) should be always visible, while others should scroll if their total width is higher than [width of the table (100%) minus width of the first ...