Can't Get Images to Line Up Horizontally Within Div

I'm making a Fluid Grid Layout webpage. The bottom div contains 4 square images in a horizontal line. In the mobile mode, I want these 4 images to remain in a horizontal line and shrink to fit. I tried Block - Display - Inline-Block and I tried Block - Whitespace - nowrap, but neither works. The images just wrap themselves below one another without shrinking in size. They only shrink when I drag the entire page horizontally to less than the width of any one image.
This is the page:
http://savcp.com/index-fluid-12.html

Have a look at my version:
        *, *:before, *:after {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        #awards {
            margin: 0 auto;
            padding-bottom: 4%;
            vertical-align: top;
            width: 60%;
        .columns {
            float: left;
        .four {
            width: 25%;
        .columns img {
            display: block;
            width: 100%;
            padding: 10px;
     <div id="awards" class="clearfix">
        <div class="four columns">
            <img alt="Manhattan Bride" src="placeholder.png">
        </div>
        <div class="four columns">
            <img alt="The Knot" src="placeholder.png">
        </div>
        <div class="four columns">
            <a href="pressrelease-01.html">
                <img alt="Bride's Choice" src="placeholder.png">
            </a>
        </div>
        <div class="four columns">
            <a href="http://www.mitzvahmarket.com/mitzvah-ideas/misc/dancejock-productions-present-madisons-squ are-garden/">
                <img alt="Mitzvah Market" src="placeholder.png">
            </a>
        </div>
    </div>
This works - set the width of the #awards container to a percentage that works for you. You may want to add a max-width and min-width in em/px to limit the fluid design somewhat.
This would also work on the "how we met" page.
Al Sparber is correct in saying you should unfloat those divs when the screen size becomes too narrow to accomodate those four columns.
And a couple of other tips/suggestions:
- #awards: remove clear:both (apply clearfix instead); remove display:block (a div is by default a block level tag already); remove float:left; (no need to float this to the left); remove margin-left:0 (a div by default already is set to a margin of 0 on all sides); and remove the width:100% (all block level tags by default go as wide as they can, so again no need for 100% width)
- you have three rules with mostly identical properties set for the #awards div. Clean this up, and define only one id selector.
- same for all the other main layout elements: three rule definitions for each! Think DryCSS (Don't Repeat Yourself). And only apply css properties that actually change the default behaviour of an element.
- remove the float:left, clear:both and display:block from all those layout divs as well. Why would you add these to your main layout elements?
- only apply a clearfix to parent layout elements that contain floated child elements.
- when the pagecontainer div is set to a width, do not add 100% width to the child layout elements. Not required.
- most of your image elements are missing the alt attribute. You should add those (otherwise the html will not validate).
- structure your menu with an unordered list
- The non-flash version of the image slideshow uses the gif image format. Unless you mean to add an animated gif Instead either use jpg or png. Many reasons for this - google it. And do not use Photoshop's limited save for web function to optimize your pngs. In my opinion, use other tools for both jpg and png (Color Quantizer, anyone?). Saves a LOT of bandwidth.

Similar Messages

  • My current project in the events library has gone into list mode. ie a single clip on the left, one above another, so showing only about 7 clips. how can I get it back into normal horizontal mode

    My  current project in the Events Library has gone into list mode. ie a single clip on the left one above another, so showing only about 7 clips. How can I get it back into normal horizontal mode?

    That's about what it's supposed to look.
    How do You want it to look ?
    a. You can change places by using this
    b. May be You changed this top right symbol of an hard disk ?
    c. or changed the number of frames to be viewed ?
    d. OR - it can (at least for me) be so that You think of how it looks in iPhoto. (To me a very common mistake)
    Yours Bengt W

  • How can we get the selected line number from JTextArea ?

    how can we get the selected line number from JTextArea ? and want to insert line/string given line number into JTextArea??? is it possible ?

    Praitheesh wrote:
    how can we get the selected line number from JTextArea ?
    textArea.getLineOfOffset(textArea.getCaretPosition());
    and want to insert line/string given line number into JTextArea??? is it possible ?
    int lineToInsertAt = 5; // Whatever you want.
    int offs = textArea.getLineStartOffset(lineToInsertAt);
    textArea.insert("Text to insert", offs);

  • By API action, how can I get the list of user IDs within a specific group  (which is created by API) ?

    By API action, how can I get the list of user IDs within a
    specific group (which is created by API) ?
    or How can I get the group (which is I create by API) ID to
    which a specific user belong by API action?
    Thanks
    Alex

    The poster already posted at the Acrobat Users Community, Interactive Forms that sums up a client order from catalog. The sample form posted to Acrobat.com was a revision of the sample form that came with Acrobat 4.0. There are some fairly advance scripts, templates, and document level functions involved with this form.

  • Can't get Image Matte Key to work in PP CS6 Mac

    Hi,
    After tearing my hair and muttering adult phrases for a couple of hours while following the below instructions from the PP CS6 pdf manual, I still can't get anything but a black screen when trying to apply the Image Matte Key to a simple set-up. The project is in HD 1080p50 format and the basic editing has been largely problem free.
    Add the clip (used as a background) to a video track in a Timeline panel.
    Add the clip you want to superimpose to any track higher than the track containing the background clip. This is the clip revealed by the track matte. Be sure the superimposed clip overlaps the background clip in a Timeline panel.
    In the Effects panel, click the triangle to expand the Video Effects bin and then click the triangle to expand the Keying bin.
    Drag the Image Matte Key to the superimposed clip in a Timeline panel.
    In a Timeline panel, select the superimposed clip.
    In the Effect Controls panel, click the triangle to expand the Image Matte Key settings.
    Click the Setup button , browse to the image being used as the matte, and then click Open to select the image.
    (Optional) If you’re animating the Image Matte Key over time, make sure that the current-time indicator is in the position you want. Click the Toggle Animation icons for the settings you adjust.
    Click the Composite Using menu and choose one of the following:
    Matte Alpha Composites the clips using the alpha channel values of the image matte you selected in step 7. Matte Luma Composites the clips using the luminance values of the image matte you selected in step 7.
    What I do is:
    • I have a clip on Video 1. I want to use a hand painted luma matte made in PS CS6 for changing levels ('exposure') in an irregular area of the clip.
    • So,  I duplicate the clip on Video 2 and add an 'RGB Curves' fx for the level adjustment.
    • Then, I add the Image Matte Key to the Video 2 clip and set up the Photoshop b/w image (RGB 8 bit, 1920x1080) from my external eSATA disk containing the Project and media (step 7 above).
    • I select 'Matte Luma' (step 9) – and expect the relevant part (painted white on the matte .psd pic) of the duplicated, level adjusted clip to be superimposed on the Video 1 clip.
    • But I only get BLACK!
    I tried using Track Matte Key, with the matte pic on Video 3 – no problem, worked just as expected.
    So, what's the voodoo with Image Matte Key?
    Kind regards,
    Joachim

    Ann, Steven, Bill,
    Thank you very much for your encouragement and duplication work! Truly appreciated.
    This morning, with some fresh energy, I attacked the problem afresh and finally found the culprit(s).
    It turned out that the major problem was the Photoshop file I originally prepared as a test matte. I created the original psd through the PP File menu to automatically get the correct dimensions. For some reason, it may have got corrupted. When it didn't work and just resulted in a black image, I used it as a template, changed it and resaved it. Apparently the problem was inherited to the resaved psd:s, even though they worked fine when imported into the project and used as mattes with Track Matte.
    Go figure…
    Anyway, today I created a brand new matte file in PS CS6 and, lo and behold, Image Matte Key now worked as expected!
    Almost…
    Going back to PS, I edited my simple matte (just two black rectangles on white) and applied a rather heavy blur. I then saved (not Save as…), deleted Image Matte Key from my fx stack in PP, reinstantiated Image Matte Key and set it up with the now resaved psd.
    No blur!
    I then went back to PS, resaved my blurred matte file with a new file name and repeated the above exercise – first deleting and then reapplying Image Matte Key, setting it up with the new, blurred matte psd.
    Now I got a blurred keying effect.
    So, it seems that Image Matte Key won't 'see' a changed file – apparently it 'remembers' the first version of the file and refuses to accept the saved changes.
    I think that I've seen a post here somewhere about the same or similar problem with PP CS5 or 5.5.
    Anyway, I've learned a lot and again, thanks to you guys who chipped in!
    Kind regards,
    Joachim

  • I have a 7510 all in one fax and can't get it on line. Can you help?

    I can't get my 7510 on line to enable fax. I tried logging ing with the fax number and pin but can't get it to work.

    Hey Mhlogging,
    Thank you for your question! I understand you're having a hard time setting up your fax. If eFax is having a hard time verifying your PIN and eFax number, try logging into into your eFax account (www.efax.com) and review your account information. It's possible that the account information is not verified on the printer. 
    If you continue to have problems, please let me know. Otherwise, feel free to mark the solution as solved.
    Thanks!
    I am an HP employee.

  • Urgent help please. Can't get image on LED cinema display.

    My husband has a traumatic brain injury. His existing monitor went kaput yesterday, &amp; I've been trying desperately to set up a new LED cinema display with his Mac Pro that was purchased May 2007 for the past 4.5 hrs without success. Can't get any image on it &amp; don't know what else to try. Any suggestions please?

    Can we assume that the graphics card has been replaced with one that has a mini display port, such as the Radeon HD 5770 or the Geforce GT 120? The originally shipped graphics card options for the 2007 Mac Pro do NOT have the Mini Display Port.
    Does my computer have a Mini DisplayPort connector?
    If not, one will either need an Atlona AT-DP400 adapter to connect the LED Cinema Display to a dual link DVI port of the graphics card OR to replace the graphics card with one that is equipped with the Mini Display Port.
    Review of the Atlona AT-DP400.
    Also, does the Mac Pro have OS X 10.6.4 or later?

  • Can't get to command line  - I'm about to scream.

    My ibook kicked over when I installed the latest software updates - it started normally after the updates, ran faster, it was great. Next morning when I started it up, nothing. Grey screen with grey apple. I've tried safe mode, it goes through the startup sequence but gets stuck at the blue screen with the rainbow spinny.
    I've tried single or verbose mode - but I only get as far as the following:
    standard timeslicing quantum is 10000 us
    vmpagebootstrap: 29635 free pages
    migtable_maxdispl = 68
    IOKit Component Version 7.9:
    Wed Mar 30 20:07:52 PST 2005; root(rcbuilder) "RELEASE_PPC/iokit/RELEASE
    69 prelinked modules
    AND, I can't get it to recognize the OS 9 install disk. Still looking for my X.3 CDs.
    Now what? Am I stuck with wiping my hard drive or is the hard drive hosed, or is it a logic board problem or what???!!!!! I'm using my B/W desktop at the moment, but had really begun to get into OS X - now I'm wishing I'd stuck with Classic.
    TIA!!!!!
    ibook G3 Mac OS X (10.3.9)
    ibook G3   Mac OS X (10.3.9)  

    Start with a couple of simple things. Before trying either, unplug any USB or Firewire devices. Leaving only the keyboard and mouse connected.
    1) Start, or restart the Mac and immediately hold down the CommandOption+PR keys to zap the PRAM. Keep holding the keys for four startup chimes. Release the keys and see if it will boot. If not, go on to step two.
    2) Resetting the Mac from Open Firmware.
    Restart the Mac and immediately hold down the CommandOption+OF keys. This will boot you into open firmware. When it stops, you will be looking at a ">" prompt. At the prompt, type each of the next three lines, followed by pressing the Return key. Type each line exactly as show (without the (press Return) part), no capital letters or spaces.
    reset-nvram (press Return)
    set-defaults (press Return)
    reset-all (press Return)
    The Mac should restart after pressing Return on the third command.
    Let us know what happened.

  • Can't get Image to switch properly

    Yesterday I made a thread about not being able to change the BorderTitle of a panel whenever I clicked one of the JRadioButtons. That was taken care of thanks to the help of 2 members of this forum.
    But then, I got stucked in another part. The program is supposed to change the main picture on top depending on which item of the JComboBox is selected.
    Since I'm really new at this, I figured I could use a similar approach to the one used yesterday and here's the relevant part of the code:
    First, here are the relevant variables for this:
    private final String mainpics[] = {"/fotos/Four Seasons/fourseasons19.jpg",
    "/fotos/Palmilla/palmilla20.jpg"};
    private JComboBox selhot;
    private final String selhotn[] = {"Four Seasons", "Palmilla"};
    private ImageIcon pic;
    private JLabel hotelnam;
    protected static ImageIcon createImageIcon(String path) {
            java.net.URL imageURL = HotelPromo.class.getResource(path);
            if (imageURL != null) {
                return new ImageIcon(imageURL);
            return null;
         }Here is the part of the code that I can't get to work:
    selhot = new JComboBox(selhotn);
    for(int k = 0; k < 1; k++) {
                     mainpics[k] = new String();
                     pic = createImageIcon(mainpics[k]);
                         final int index1 = k;
                     selhot.addActionListener(new ActionListener() {
                         public void actionPerformed(ActionEvent e) {
                                 pic = new ImageIcon();
                                 pic = createImageIcon(mainpics[index1]);
            hotelnam.setIcon(pic);What am I doing wrong??
    Also, is there a way for it to change the value of an int value to 0 when the first hotel is selected and then to 17 when the second one is selected?
    Thanks and sorry for the stupid question.

    Yep, thanks a ton it works now.
    Now to the hardest part of the problem (I think so at least).
    There are 2 RadioButton Groups with 4 buttons each.
    The first JRB Group selects the type of room you wish to choose (Single, Deluxe, etc.)
    The second JRB Group selects the type of view from the desired room (Bathroom, Bedroom, etc.)
    So basically, there are 16 pictures in total for each hotel, for 2 hotels, we have 32.
    I grouped the pictures in the following way:
    private final String hotsfotos[] = {"/fotos/Four Seasons/fourseasons02.jpg",
                                                      "/fotos/Four Seasons/fourseasons04.jpg",
                                                      "/fotos/Four Seasons/fourseasons09.jpg",
                                                      "/fotos/Four Seasons/fourseasons11.jpg",
                                                      "/fotos/Four Seasons/fourseasons22.jpg",
                                                      "/fotos/Four Seasons/fourseasons21.jpg",
                                                      "/fotos/Four Seasons/fourseasons25.jpg",
                                                      "/fotos/Four Seasons/fourseasons20.jpg",
                                                      "/fotos/Four Seasons/fourseasons24.jpg",
                                                      "/fotos/Four Seasons/fourseasons10.jpg",
                                                      "/fotos/Four Seasons/fourseasons08.jpg",
                                                      "/fotos/Four Seasons/fourseasons17.jpg",
                                                      "/fotos/Four Seasons/fourseasons13.jpg",
                                                      "/fotos/Four Seasons/fourseasons12.jpg",
                                                      "/fotos/Four Seasons/fourseasons01.jpg",
                                                      "/fotos/Four Seasons/fourseasons14.jpg",
                                                      "/fotos/Palmilla/palmilla03.jpg",
                                                      "/fotos/Palmilla/palmilla02.jpg",
                                                      "/fotos/Palmilla/palmilla13.jpg",
                                                      "/fotos/Palmilla/palmilla00.jpg",
                                                      "/fotos/Palmilla/palmilla08.jpg",
                                                      "/fotos/Palmilla/palmilla09.jpg",
                                                      "/fotos/Palmilla/palmilla21.jpg",
                                                      "/fotos/Palmilla/palmilla04.jpg",
                                                      "/fotos/Palmilla/palmilla12.jpg",
                                                      "/fotos/Palmilla/palmilla10.jpg",
                                                      "/fotos/Palmilla/palmilla23.jpg",
                                                      "/fotos/Palmilla/palmilla16.jpg",
                                                      "/fotos/Palmilla/palmilla18.jpg",
                                                      "/fotos/Palmilla/palmilla17.jpg",
                                                      "/fotos/Palmilla/palmilla22.jpg",
                                                      "/fotos/Palmilla/palmilla07.jpg",};I was thinking making the program return a int = 16 if the second hotel was selected, and then making each of the radio buttons add multiples of 4. Is this the best way to do it or is there any other way?
    I appreciate all the help that has been given to me. Sorry for making so many questions.

  • Can't get image in the scroll pane.

    I have written a program to show image in scrollpane. Image has put in the same directory of program. But Still I am not getting image in the scroll pane.
    Please have a look into program and let me know where I commit mistake.
    package com.lko.fx.controls;
    import javafx.application.Application;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    * @author Upadhyay
    public class ScrollPaneFx extends Application{
    private Scene scene;
    private Group root;
    * @param args
    public static void main(String args[]){
    launch(args);
    * @param primaryStage
    * @throws Exception
    @Override
    public void start(Stage primaryStage) throws Exception {
    root = new Group();
    scene = new Scene(root, 300, 240, Color.WHITE);
    scrollPaneDemo();
    primaryStage.setTitle("ScrollPane Demo");
    primaryStage.setScene(scene);
    primaryStage.show();
    private void scrollPaneDemo() {
    ImageView imgView = new ImageView(new Image(this.getClass().getResourceAsStream("img.png")));
    ScrollPane spane = new ScrollPane();
    spane.setContent(imgView);
    root.getChildren().add(spane);
    Thanks in Advance!
    Regards,
    Himanshu

    Ok, check whether it is the image loading or something else in your code. Is the result of the getClass().getResource() method null or not null? Once we know that we know which direction to hunt in.
    Also I assume you are running in an IDE. Which one? Make sure the build picks up images. Maven for example won't pick them up from your 'src/java' directory.

  • How can I get an autogenerated value in Postgres within a new SQL statement?

    There are two possible ways that I could go about doing this. 
    The firstn the creation of a new record, my schema in Postgres automatically inserts a unique value into a given field.  However, whenever I run queries to get that value using Teststand, I get an error that states the value is null.  However, querying from psql, I am able to see the UUID.
    Note that the field itself is not problematic.  If ask for the UUID value in the previous record, it fetches the value from two records ago--which is a bit odd, but is better than recieving a null value.
    The second way to do this is to query the sequence which we use to generate the UUID.  In Postgres a sequence is simply an autoincrementing value.  Each time it is used, it increments by a given amount.  Further, the current value of the sequence can be queried as follows:
    SELECT last_value FROM *sequence_name_goes_here*
    However, running this query and then trying to get that value and store it also returns a null error.  To be fair though, the sequence is not viewable within the Teststand Database Viewer. 
    For reference, I'm using Teststand 2.0.  For the driver I'm using the Microsoft OLE DB Provider for ODBC Drivers.  I'm using Postgres 8.0.12.
    I'd appreciate any thoughts or suggestions on how to make this work.  Does anyone here have Postgres experience?
    Note that the same Teststand code that we're running now worked fine in Access, but causes the aforementioned errors in Postgres.
    Thanks,
    Tim

    Brandon,
    Thanks for getting back to me.
    I'm not quite sure what you mean.  I'm using Teststand's sequence editor.  Within this there are options for running SQL queries.
    For connecting to Postgres, I'm using a .udl file that relies on a Postgres ANSI driver, which I believe came with my install of Postgres.
    In any event, I think I've narrowed down my question a bit (now that I understand more how Teststand works).
    When one runs an SQL query within Teststand you have the options of "Fetch previous," "Current," etc.  This was connected to the default Access schema (UUT_RESULT) and a RUN_ID was generated on every "CREATE NEW RECORD." 
    I think the problem is that, when you run a "SELECT" query with the parameter set to "Create new record" Access will generate the RUN_ID before returning the results.  With Postgres, it won't generate the RUN_ID until one inserts the "default values."  Here is the SQL log of what Teststand is sending Postgres:
    Mar 26 14:01:37 [postgres] [12-1] <46081865.1bcd>LOG:  statement: SELECT uut_result.run_id, uut_result.station_id, uut_result.start_date_time  FROM uut_re
    sult
    Mar 26 14:01:37 [postgres] [13-1] <46081865.1bcd>LOG:  statement: INSERT INTO uut_result DEFAULT VALUES
    To do this, I just have to run "set" and then "put" without setting or putting any specific values.
    So here is my updated question:
    If I run a new select query(over a new statement) and choose "Fetch next", each time I call that it will iterate through the select query, starting with the very first record.  My question is, how can I tell it to stop when it gets to the last record, since there is no telling what the last record is?  Or, in general, how can I get the values in the final record?  We've changed the RUN_ID to simply be an incrementing integer, so if a MAX aggregate function can be run, that might work.
    Any ideas?
    Thanks,
    Tim

  • Centering Image Horizontally within Div Layer

    I've placed an image inside a div layer. The div layer is 200 pixels wide by 200 pixels high. My image is 480 pixels x 720 pixels. So the layer is smaller than the image. How do I center the image horizontally within my div layer? I've applied a css rule on the layer as followed:
    #pictureframe {
    position:absolute;
    width:200px;
    height:200px;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    display: inline-block;
    Because the image is larger than the div layer the image doesn't want to center horizontally. It seem to justify itself on the left side of the div layer even though I've applied a text-align: center on it. Any suggestions.

    Make your division at least as wide as your image.  Height of divisions should always be determined by content inside it.  If you impose a height limit on your division, increased content or text size will fail, causing content to be hidden.  If required to display a background-image, use the min-height property.
    APDivs as a primary layout method seldom works well. Here is why:
    http://apptools.com/examples/pagelayout101.php
    Also, APDivs cannot be centered as they are removed from the normal page flow. You might try wrapping an APDiv inside a relatively positioned parent container, but without seeing your page (entire code), it's impossible to say for sure if this will work for you.
    See Centering Pages, Images and other elements with CSS
    http://cookbooks.adobe.com/post_Centering_web_pages_and_other_elements_with_CSS-16640.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Can you change image to line art?

    Can you take an image (photograph of a person for example) and convert it to line art? If so, can you convert the whole picture to a black and white (no shades of gray) line art?
    Thanks!

    "Line art " can actually mean many things. Do you mean outlining in Black and White? There are some Actions on the Adobe Exchange that will do that or use Find Edges or Graphic Pen or some of the other Filters. There are also plugins you can get like Outliner.
    Or you might want to use Adobe Streamline to trace it in vector paths.

  • Can't get images to Bridge. It's useless.

    I've 2 training book's images on hard drive which are supposed to show up in Bridge. They don't. "Folders" has no OPEN command to get them there, Favorites is therefore empty, and so is content. The Main page opens all.
    So, why Bridge? The work area seems to be in the main page and that seems to be the place for all lesson images to start. If there is something I am not understanding about Bridge's function, I look for enlightenment.................thanks much.............mm

    Some questions back to you that might help dianose what's going on . . .
    After you've clicked on the Folders tab, can you navigate to where the files are? One wrinkle in Bridge is if the drive you are trying to navigate to is NOT a local drive, you need to map to that drive before Bridge will recognize it. You cannot browse Network Neighborhod or use the \\ServerName\resource type of navigation you may be used to.
    What format are these images in? And when you say image, what do you mean? If these are imbedded in a Word document, you are out of luck. If they are in a propitery graphics format, they may not be visible either. Some other common formats, notably WMFseem inconsistent. Bridge is an Adobe product and designed to aid your workflow within their line of products.
    What are you trying to do? If you want to open the grahics images or the document layout to work on them, and they are in a format that Creative Suite recognizes, Bridge is the right tool. If you are expecting to browse the lessons and complete the workbook, Bridge is not the correct application.
    Despite the problems I've encountered, WMF and network browsing problems noted above, I find Bridge a great tool. There is a lot that you can do from within Bridge without opening a major piece of Creative Suite.

  • Can't get image slider to work

    Every image slider tutorial I do, I can't seem to get to work! I'm obviously doing something wrong!! Could someone please point out what it is please? I've been going onto CodePen > typing in responsive image slider > copying the html > creating a separate CSS and JS and linking to them. But when I run the page, nothing happens. What vital ingredient am I missing?
    Untitled Document
    Thanks.

    I agree with you pal - there's no point in trying to be clever if no-one can find the code.
    If you want the slider you're talking about then copy the code below and paste into a dreamweaver document and browse - have fun and then go tell code pen they are a pile of shite.
    <!DOCTYPE html><html class=''>
    <head><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="canonical" href="http://codepen.io/MarcoGuglielmelli/pen/ogZWpv" />
    <style class="cp-pen-styles">@import url(http://fonts.googleapis.com/css?family=Jacques+Francois);
    @import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans);
    body {
      background-color: #979797;
      color: #fff;
      margin: 0em;
      padding: 0em;}
    .page {
      max-width: 640px;
      margin: 0px auto 30px auto;}
    .panel {
      background-color: #fff;
      color: #666;
      box-shadow: 3px 4px 5px rgba(0, 0, 0, 0.2);
      overflow: auto;}
    button {
      border: none;}
    /********** LOGO **********/
    h1 {
      text-align: center;
      width: 200px;
      height: 20px;
      margin: 40px auto 40px auto;
      background-repeat: no-repeat;
      text-indent: 100%;
      white-space: nowrap;
      overflow: hidden;}
    /********** TYPOGRAPHY **********/
    body, button {
        font-family: 'Jacques Francois', serif;}
    h2, h3 {
      font-weight: normal;
      margin: 0em;}
    h2 {
      color: #666;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-size: 230%;
      line-height: 1em;
      padding: 20px 0px 0px 20px;}
    h3 {
      font-size: 90%;
      letter-spacing: 0.2em;}
    p {
      font-family: 'Quattrocento Sans', sans-serif;
      line-height: 1.4em;}
    a {
        text-decoration: none;}
    button {
      font-size: 90%;
      text-align: left;
      text-transform: uppercase;}
      /*****************  No JS ***************/
    #billboard {text-align: center;}
    .js-warning {display: none;}
    .no-js .js-warning {
      display: block;
      border: 3px solid #fff;
      text-align: center;
      background-color: #fff;
      color: #db5391;
      padding: 10px;}
    /********** SLIDER **********/
    .slider {
      max-width: 940px;
      margin: 0px auto 30px auto;}
    .slide-viewer {
        position: relative; /* needed for IE7 */
        overflow: hidden;
        height: 430px;}
    .slide-group {
        width: 100%;
        height: 100%;
        position: relative;}
    .slide {
        width: 100%;
        height: 100%;
        display: none;
        position: absolute;}
    .slide:first-child {
        display: block;}
    /********** BUTTONS **********/
    .slide-buttons {
      text-align: center;}
    .slide-btn {
      border: none;
      background: none;
      color: #000;
      font-size: 200%;
      line-height: 0.5em;}
    .slide-btn.active, .slide-btn:hover {
      color: #ed8e6c;
      cursor: pointer;}</style></head><body>
    <header><h1>Responsive Slider</h1></header>
    <section>
          <div class="slider">
            <div class="slide-viewer">
              <div class="slide-group">
                <div class="slide slide-1">
                  <img src="http://javascriptbook.com/code/c11/img/slide-1.jpg" alt="No two are the same" />
                </div>
                <div class="slide slide-2">
                  <img src="http://javascriptbook.com/code/c11/img/slide-2.jpg" alt="Monsieur Mints"  />
                </div>
                <div class="slide slide-3">
                  <img src="http://javascriptbook.com/code/c11/img/slide-3.jpg" alt="The Flower Series"  />
                </div>
                <div class="slide slide-4">
                  <img src="http://javascriptbook.com/code/c11/img/slide-4.jpg" alt="Salt o' The Sea"  />
                </div>
              </div>
            </div>
            <div class="slide-buttons"></div>
          </div>
        </section>
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>
    <script>
    $('.slider').each(function () {
        var $this = $(this);
        var $group = $this.find('.slide-group');
        var $slides = $this.find('.slide');
        var buttonArray = [];
        var currentIndex = 0;
        var timeout;
        function move(newIndex) {
            var animateLeft, slideLeft;
            advance();
            if ($group.is(':animated') || currentIndex === newIndex) {
                return;
            buttonArray[currentIndex].removeClass('active');
            buttonArray[newIndex].addClass('active');
            if (newIndex > currentIndex) {
                slideLeft = '100%';
                animateLeft = '-100%';
            } else {
                slideLeft = '-100%';
                animateLeft = '100%';
            $slides.eq(newIndex).css({
                left: slideLeft,
                display: 'block'
            $group.animate({ left: animateLeft }, function () {
                $slides.eq(currentIndex).css({ display: 'none' });
                $slides.eq(newIndex).css({ left: 0 });
                $group.css({ left: 0 });
                currentIndex = newIndex;
        function advance() {
            clearTimeout(timeout);
            timeout = setTimeout(function () {
                if (currentIndex < $slides.length - 1) {
                    move(currentIndex + 1);
                } else {
                    move(0);
            }, 4000);
        $.each($slides, function (index) {
            var $button = $('<button type="button" class="slide-btn">&bull;</button>');
            if (index === currentIndex) {
                $button.addClass('active');
            $button.on('click', function () {
                move(index);
            }).appendTo('.slide-buttons');
            buttonArray.push($button);
        advance();
    //@ sourceURL=pen.js
    </script>
    <script src='http://codepen.io/assets/editor/live/css_live_reload_init.js'></script>
    </body></html>

Maybe you are looking for

  • I can't back up my iphotos to an external memory (Not an apple product) wont let me, please help. . .  thanks

    need help/intstruction in backing up my iphoto to an external drive . . . tried suggestions over Youtube and several other internet sources, unsuccessful, please help. thanks. . . .

  • PLD - Company Details on PO's, Sales Orders, etc. printing blank space

    Hello, I am onsite at a client and I am designing the print layout of all their marketing documents. In the company details section, their is a field called "Block"... This is left blank because I have nothing to put there. Because this field is blan

  • Set valuation type when create or change po

    In our po line item on the screen, there have a check box to mark those item as free and set the unit price as zero. Now i get a reqirement that want to set the valuation type to FOC once the checkbox is check. I would like to know can i achieve the

  • Why can't I use a PIN for encryption?

    I had to do a factory restore in order to accept the 4.4.4 update. Since then, I have tried to encrypt my device. Previously, my device was encrypted with a PIN instead of a password. The instructions clearly state you can use a PIN or a password, bu

  • Any fix for not playing swf files?

    Hello Having trouble getting FF to play my Flash 8 swf files on this page http://www.enhancedwireless.net/indexrdm.html There should be a small logo animated for about 3 sec in the upper left of this page, but instead I get nothing on my MAC OS 10.3.