css

css - Displaying images with horizontal scroll bar

Hi, I'm trying to display a number of images horizontally inside of a fixed-width div. I would like to use a horizontal scroll bar to display the images which do not fit inside the div. However, the images are displaying vertically, rather than horizontally. Is there a way to force them to display side-by-side? div#event { width: 15...

Firefox 3.5 duplicating code

I have an issue that seems to be appearing in Firefox 3.5.2. When i view the page it looks find but then a click on one of the links on the page then return to the page either using the back button or clicking a link on the following page that returns to the first page. (if that makes any sense). I use firebug when i return to the first...

IE6 breaks cached design

I have a design which loads nicely in IE6, but as soon as I reload it 1-2 times, it all of a sudden collapses. When I upload an updated version, it recovers from it, and breaks after a few reloads. On a sidenote: I can't test the site on a "real" IE6, I'm using the IEtester found here: IE Tester Maybe it's a problem with this program? ...

Cause <DIV> contents to spread out?

Imagine I have a navigation bar in my page header, with a number of links. I'd like the links to spread out horizontally to fill the parent ; is there a way to do this using CSS which doesn't rely on me hard-coding based on the number of links? e.g if I add or remove a link I'd like it to still work. I tried: <div class="navBar"> <...

How do I position a html table at the very top of the screen?

Using html and css for IE7, how do I position a html table at the very top of the screen without the top border that is automatically generated? I am developing in vs2008. ...

I need to remove the Horizontal Scrollbar on an overflown <DIV>

I have defined a tag with a CSS attribute "overflow" set to "scroll". This is giving me both the vertical and the horizontal scroll bars. I only want the vertical scroll bar. What should i do? ...

How do I make a div expand to the width of the page with css?

I have a page with a couple of divs, sort of like this: <div id="div_one">blah blah blah</div> <div id="div_two">blah blah blah</div> I want them to be centered horizontally, one after the other and for the second to expand to the width of the page. ...

Padding the top and the bottom of inline element

Hello Quote from Head first html: You can add padding to the top and bottom of inline element, but the padding doesn’t affect the spacing of the other inline elements around it, so the padding will overlap other inline elements a) As far as I understand the above quote, adding padding to the top and bottom of inline element does...

How can I quote strings in SASS?

I'm using SASS to generate a @font-face mixin, however this: =remotefont(!name, !url) @font-face font-family = !name src = url(!url + ".eot") src = local(!name), url(!url + ".ttf") format("truetype") +remotefont("My font", "/myfont.ttf") becomes this: @font-face { font-family: My font; src: url(/myfont.ttf.eot); ...

Setting focus on an input element after setting display:block

I have an HTML along the following lines: <div class="hiddenClass"> // this implies display:none <span> <input type="text" id="hiddenInput"/> </span> </div> and a Javascript event (triggered in a "succes" method of an jQuery $.ajax() call ), that needs to make this div visible and then set the focus to the control. Something li...

css/php: how to solve this div float problem / odd even loop in array

My code is at the end of this post. How on earth do i get "box 3" to aligh next to "box 1" OR to the content inside "box 1" instead of aligning itself at the end of "box 2". The important thing here is that all four boxes MUST use the same style - (style 2) as it's being used in an called by an array. Here is what it is now and what i...

How do I set the color of the horizontal lines between rows in a asp.net gridview?

Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the css border controls and can't set the color of the horizontal line between rows in an asp.net gridview. The color of the line seems to be defaulting to white. The only way those rows are visible are if the background color of the gridview is set to a da...

Why adding/removing css classes like this won't work?

Ok so I have a GridView like this: <asp:GridView ID="gv" runat="server" ... > ... <HeaderStyle CssClass="header" /> <RowStyle CssClass="datarow" /> <AlternatingRowStyle CssClass="datarow alt" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox runat="server" ID="gvchkDelete" /> </ItemTemplate> ...

Style attribute vs setting ID and external Css

I understand the concept of keeping all presentational elements outside of the markup and putting them into an external .css file. I want to get a feel for what types of situations you'd justify use of the style attribute vs setting IDs and external Css. To this point, I've used the style attribute a lot, I usually use it to specify p...

What is the correct way to replace this html/table code with a div or span

I have this html that I use to create a box look around the title, this is for a flowchart looking page. Fairly straight forward and looks correct. <td> <table align="center" border="0" style="border: thin solid black;" cellpadding="0"> <tr> <td align="center" nowrap style="padding: 5px;" class="h...

Random background image for div

I have an ASP.NET site that shows a number of products from a database. At the moment the background image for each product is set in CSS in the productBox class. What I would like is for each product to have a random background image from a selection of 4 images. I'm thinking that using jquery would be the way forward ? <div class="pro...

Many requests to one picture file which is referenced from CSS

Hi, I have created CSS-sprite file for reducing number of requests to the server. But when the page is loaded, I can see in Firebug many GET requests to the same picture file (accoring to number of CSS rules applied with that picture). Probably, from that bunch of requests only one is real and the rest are taken from browser's cache, ...

IE8 float issue with CSS

I'm sure this must have been covered before because I'm sure I'm not the first to do this, but I can't find the answer. I am creating a shadow effect for a <div> using repeated background images. In the bottom two corners I use small 9x5 px images. I float them left and right and in Firefox and Safari they look perfect. In IE8 (and p...

How can I make an img and text link both link to the same place and both become active on hover independent of which one i am hovering over?

I would like to be able to have hovering over the image invoke the hover property on the text link too that is next to it. I have a image preview of a video and the video name written next to it as text string. I'd like to make it so i can hover on the picture and make the text still change color like a hover effect without having to ...

Create CSS sprites based on colour?

I have a large set of thumbnails I wish to display on a page (over 200). I'd like to use CSS sprites to load them to minimise the HTTP requests. I think putting all of them in one massive file is a bad idea, but splitting them into about 6 files of 40-50 thumbnails should work nicely. All of the thumbnails are fairly low colour (can be ...