How to adjust height of header image in fluid grid layout

I appreiate the help people are trying to give me but I need help on what "to" do not on what "not" to do. I'm tryinh to tweek the height of my header image in the indivisual device views without screwing each other up.Meaning when I adjust the height in smartphone view I dont want it to affect tablet view, or when I adjust the height in desktop view it doesn't affect smartphone view, and so on and so on. The width works fine (right now at least) because its simple 100% of screen so it scales great right now. Its the height I cant get!!! I cant adjust it. Each device needs a little tweek beause of design issues. PLease help
ps no tutorial i've seen helps with the issues i'm going through, none. And I've had people offer suggestions so I done wasting days looking at these things. I just need the anwser a what to do.

If you alter the height in the applicable css media query only that device will observe the specified height.
What is it you are actually trying to do. Simple example below:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style>
#header {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
img {
    max-width: 100%;
    height: auto;
@media screen and (max-width: 480px) {
.changeHeight {
height: 500px;
</style>
</head>
<body>
<div id="header">
<img src="yourImage.jpg" class="changeHeight"></div>
</body>
</html>
If you want to target screens with a max-width of 480px you would write a css media query:
@media screen and (max-width: 480px) {
.changeHeight {
height: 500px;
However not sure why you would want to change heights as it will distort the image.
You could server up an alternative sized image for desktop, tablet and smartpone:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<style>
#header {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
img {
    max-width: 100%;
    height: auto;
.tablet {
display: none;
.smartPhone {
display: none;
@media screen and (max-width: 480px) {
.deskTop {
display: none;
.tablet {
display: none;
.smartPhone {
display: block;
</style>
</head>
<body>
<div id="header">
<img src="deskTop.jpg" class="deskTop">
<img src="tablet.jpg" class="tablet">
<img src="smartPhone.jpg" class="smartPhone">
</div>
</body>
</html>

Similar Messages

  • Placing a background image in fluid grid layout

    I am having trouble building a fluid grid layout  I am not sure why but when I shrink the layout it doesn't seem to work correctly
    I need to do 2 things.
    1) make the background image shrink as it is suppossd to. when you scale down the images doesn't shirink to tablet size and isn't there for the phone size (although I think I want a new image for phone with just one side of the (page image). on it so I assume I just link that in there under that section in in the css
    2)It doesn't seem to want to align the writing so that it is only over the page section of the background image on each side (the rightcontent and left content boxes-ie they should look like text on a page)
    also I want to take the page here when it is finished and make it a template for further pages (just changing the text) is that done the same as usual for the fluid grids?
    Thank you in advance for the help
    Here is the link that the site has been temp posted on for detail editing. 
    http://approvalsite.info/

    Kind of makes sense.
    I am not sure how to make the div tag layouts relative to the background image.
    please advise.
    also, I have been playing with it and it seems to be working better now.
    But the issue I have with it now is that the image on the right side of the page keeps showing at the bottom of the page instead of on the top of the page directly next to the wording on the left.
    does anyone know why?
    I am sure it is just a simple coding issue.
    help
    approvalsite.info
    CSS:
    @charset "utf-8";
    /* Simple fluid media
       Note: Fluid media requires that you remove the media's height and width attributes from the HTML
       http://www.alistapart.com/articles/fluid-images/
    img, object, embed, video {
        max-width: 100%;   
    /* IE 6 does not support max-width so default to width 100% */
    .ie6 img {
        width: 100%;
        Dreamweaver Fluid Grid Properties
        dw-num-cols-mobile:        5;
        dw-num-cols-tablet:        8;
        dw-num-cols-desktop:    12;
        dw-gutter-percentage:    25;
        Inspiration from "Responsive Web Design" by Ethan Marcotte
        http://www.alistapart.com/articles/responsive-web-design
        and Golden Grid System by Joni Korpi
        http://goldengridsystem.com/
    /* Mobile Layout: 480px and below. */
    .gridContainer {
        width: 85%;
        padding-left: 1.82%;
        padding-right: 1.82%;
        background: url(../images/DSC_0014.jpg) center fixed;
        -webkit-background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          -background-size: cover;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #header {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #menubar {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #leftcontent {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
        height:auto;
    #rightcontent {
        clear: both;
        float: right;
        margin-left: 0;
        width: 100%;
        display: block;
        height:auto;
    #footer {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
    @media only screen and (min-width: 481px) {
    .gridContainer {
        width: 90.675%;
        padding-left: 1.1625%;
        padding-right: 1.1625%;
        background: url(../images/DSC_0013.jpg) no-repeat center center fixed;
          -webkit-background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          -background-size: cover;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #header {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #menubar {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #leftcontent {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #rightcontent {
        clear: both;
        float: right;
        margin-left: 0;
        width: 100%;
        display: block;
    #footer {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    /* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
    @media only screen and (min-width: 769px) {
    .gridContainer {
        width: 90%;
        max-width: 1232px;
        padding-left: 0.75%;
        padding-right: 0.75%;
        margin: auto;
        background: url(../images/DSC_0013.jpg) no-repeat center center fixed;
          -webkit-background-size: cover;
          -moz-background-size: cover;
          -o-background-size: cover;
          -background-size: cover;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #header {
        clear: both;
        float: left;
        margin-left: 5%;
        width: 100%;
        display: block;
    #menubar {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #leftcontent {
        clear: both;
        float: left;
        margin-left: 15%;
        width: 30%;
        display: block;
        padding-right: 2%;
    #rightcontent {
        clear: none;
        float: right;
        margin-left: 1%;
        width: 49%;
        display: block;
        margin-right: 8%;
    #footer {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    HTML
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="_css/layout.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    <!-- Start css3menu.com HEAD section -->
    <link rel="stylesheet" href="index_files/css3menu1/style.css" type="text/css" />
    <!-- End css3menu.com HEAD section -->
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="header"><h1>Jan Kardy's Literary Agency</h1></div>
    <div id="menubar">
    <!-- Start css3menu.com BODY section id=1 -->
    <ul id="css3menu1" class="topmenu">
        <li class="topfirst"><a href="../index.html" style="height:18px;line-height:18px;">Home</a></li>
        <li class="topmenu"><a href="../about_jankardys.html" style="height:18px;line-height:18px;">About Jan Kardys</a></li>
        <li class="topmenu"><a href="#" style="height:18px;line-height:18px;"><span>Resources</span></a>
        <ul>
            <li><a href="../Education_connection.html">Education Connection</a></li>
            <li><a href="../submission_guidelines.html">Submission Guidelines</a></li>
            <li><a href="#"><span>Blogs</span></a>
            <ul>
                <li><a href="http://unicornwritersconferencect.blogspot.com/">Unicorn Writers Conference</a></li>
                <li><a href="http://advancenetworkingunicorn.blogspot.com/">Advanced Networking Blogs</a></li>
            </ul></li>
            <li><a href="../first_steps_to_publishing.html">First Steps to Publishing</a></li>
            <li><a href="../library_publish_events.html">Library &amp; Publishing Events</a></li>
            <li><a href="#">Art Gallery</a></li>
        </ul></li>
        <li class="topmenu"><a href="#" style="height:18px;line-height:18px;">Clients</a></li>
        <li class="toplast"><a href="#" style="height:18px;line-height:18px;">Contact Jan Kardys</a></li>
    </ul>
    <p style="display:none"><a href="http://css3menu.com/">Horizontal Menu Using CSS Css3Menu.com</a></p>
    <!-- End css3menu.com BODY section -->
    </div>
      <div id="leftcontent">
        <p>Jan   Kardys, President of Black Hawk Literary Agency, has thirty years of   diversified publishing experience for nine major publishing   corporations. Black Hawk Literary Agency LLC represents a broad spectrum   of authors and illustrators, with a focus on new nonfiction and   fiction.  <br />
        </p>
        <p>Jan was Director of   Contracts for Warner Books/Little, Brown &amp; Company, Director of   Contracts at Macmillan Publishing Company, Charles Scribner's Sons, and   Contracts Director at Prentice Hall/Simon &amp; Schuster. Ms. Kardys has   worked at Harcourt Brace Jovanovich, Doubleday, Scholastic, Lippincott   &amp; Crowell, Publishers, St. Martin's Press, Conde Nast Publications,   and Google. Beginning a career in editorial, Jan also worked in art and   production in School publishing. Jan held various executive positions in   subsidiary rights, licensing, database design, imaging, royalty   conversions, contracts, copyrights &amp; permissions departments.<br />
        </p>
        <p></p>
      </div>
        <div id="rightcontent"><p><strong><center>Jan Kardys, Literary Agent<br />
        Black Hawk Literary Agency, LLC. <br />
        17 Church Hill Road,<br />Redding, CT 06896</center></strong></p>
        <p><strong><center>
          <p><img src="images/jankardys.jpg" alt="jankardys_headshot" /></p>
          <p>Blog: <a title="http://bookpublishingteacher.blogspot.com" onkeypress="window.open(this.href); return false;" onclick="window.open(this.href); return false;" href="http://bookpublishingteacher.blogspot.com">http: bookpublishingteacher.blogspot.com</a><br />
          </p>
          <p>Email: <a href="mailto:[email protected]" title="mailto:[email protected]">[email protected]</a> <br />
          </p>
          <p>Phone: 203-938-7405</p>
        </center></strong></p>
      </div>
        <div id="footer"><h6>Webpage designed by Technomage Web Design</h6></div>
    </div>
    </body>
    </html>

  • Background Images in Fluid Grid Layouts

    How can I get the background image that I assign to a fluid grid layout div to fill up 100% of the grid space and at the same time size the background to the fluid boundaries of the div  the same way as if I had placed an image into the div?  Currently, the background image lays in the grid at the pixal size of the background picture with only the portion of the background showing commenserate withthe size of the div contents.  I use CS6.
    Thank you.

    In your CSS Styles menu, if you double click on the layout div you are working on or the grid container, you will find that the image will show if you hit the return key. If you create a table bigger than the div tag or grid container, it will automatically resize and you be able to see your image. Thats a couple of cheat ways so you can see your image when you work and when you publish.
    It just means you will have several of this code: <p> </p>
    The image will only show the width and the height of layout div that you are working in.
    I have been able to place one fluid grid layout div tag inside on another, although I find that if I make this a template file, the template tends to break over time. Not sure it that's because I am giving Dreamweaver a headache with multiple fluid grid layout div tags inside each other.
    The most I have done: 1st level grid container, 2nd level inside grid container were layout div for spry collapse panel menus, 3rd level inside layout div for spry collapse panel menus were sub menus.
    I have tried placing one image in the background of the grid container and then another image over the top in a fluid grid layout div tag. The reason why they move is because of the fixed/scroll option inside the CSS style. I found that when publishing, certain browsers shift both images either up or down. This can be a problem, especially if you create an image with a white box and try to align the second image up inside.
    It probably can be done, and I spent months hand coding and playing with the file. IE8 is a problem and I have added extra code which I found online. Firefox tends to move things on Windows platform, but MAC is not as bad. Safari and Chrome tends to work better with fluid grid layouts. There is an option for the early versions of browsers so they can recognise things.
    To resize everything when in tablet and mobile, I found tablet grid container/layout div tage size 80-90% and mobile to 40-50% grid container/layout div tage size.
    Hope this helps

  • Background images in fluid grid layouts Dreamweaver CS6

    How can I get a background image png or jpg original size 1040w by 840h to scale down in the tablet and mobile layouts in Dreamweaver CS6 fluid grid layout?

    Adding one of these in your CSS should do the trick...
    background-size:contain;
    or
    background-size:cover;
    Depending on the layout of your background image, one may work better than the other.

  • How to Get SWF to be Responsive in Fluid Grid Layout?

    I inserted my swf in a fluid grid layout div tag so it would fit on any screen. But no matter which Scale setting I use for the swf (noborder, default, exactfit, noscale, or showall) nothing works.
    Take a look This one is exactfit. It scales but does not maintain the proper aspect ratio.
    http://savcp.com/index-fluid-05.html

    Line 177 & 189, change:
    <param name="scale" value="exactfit">
    to:
    <param name="scale" value="showAll">
    showAll will maintain proportions while fitting to 100% width & height - but beware your container holding the SWF will show the background color of SWF (black in your case) when you're sizing down. You could consider changing it to your site background (gray) to ensure it doesn't look odd.
    On a sidenote, why are you worried about putting a SWF file into a responsive design? It will not work on mobile devices anyway!

  • How to Get HTML5 Slideshow to Shrink in Fluid Grid Layout?

    I am able to insert images in a Fluid Grid Layour Div Tag and it shrinks according to the platform on which it is viewed.
    But I am trying to have the same result with a slideshow. I used CreateJS to convert the slideshow from Flash to HTML5.
    The problem is it won't shrink.
    Here is the URL.
    http://savcp.com/index-fluid-01.html

    Responsive Layouts require responsive slideshows. 
    Cycle2 is responsive.  Copy & Paste this into a New, Blank document.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--helpf for older IE browsers-->
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**Slideshow**/
    .cycle-slideshow {
    max-width:90%;
    margin: 0 auto;
    text-align: center;
    .cycle-slideshow img {max-width:100%}
    /* prev / next links */
    .cycle-prev, .cycle-next {
    position: absolute;
    top: 0;
    width: 30%;
    opacity: 0;
    filter: alpha(opacity=0);
    z-index: 800;
    height: 100%;
    cursor: pointer;
    .cycle-prev {
    left: 0;
    background: url(http://malsup.github.com/images/left.png) 50% 50% no-repeat;
    .cycle-next {
    right: 0;
    background: url(http://malsup.github.com/images/right.png) 50% 50% no-repeat;
    .cycle-prev:hover, .cycle-next:hover {
    opacity: .7;
    filter: alpha(opacity=70)
    /**END SLIDESHOW STYLES**/
    </style>
    </head>
    <body>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-fx=scrollHorz
        >
    <!-- prev/next links -->
    <div class="cycle-prev"></div>
    <div class="cycle-next"></div>
    <!--insert your images below-->
    <img src="http://jquery.malsup.com/cycle2/images/p1.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p2.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p3.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p4.jpg">
    <p>Mouse over image for previous / next links</p>
    </div><!--end slideshow-->
    </body>
    </html>
    Nancy O.

  • How do I center a div on a fluid grid layout. The div is a video player restricted to 630px by 350 px?

    I am building a fluid grid website and I have a web player in a <div> that is styled to be no larger than 630px by 350 px. I can't figure out how to get this div to stay center on the page no matter if it is mobile, tablet, or desktop. Can anyone shed some light on this?

    Change display to block, apply the margain: auto.

  • Re-sizing images in fluid grid layout (responsive site design)

    I have an image that I placed in dreamweaver cc. It scales great in all deives and browsers. The thing is I want to make some small ajustments with its height in the differant devices and when I do so in one device it screws everything up in all the others terribly.

    Mr.adobe2341 wrote:
    I have an image that I placed in dreamweaver cc. It scales great in all deives and browsers. The thing is I want to make some small ajustments with its height in the differant devices and when I do so in one device it screws everything up in all the others terribly.
    Throw us some code.......preferable a link url to what you have so far.

  • Making my header background image scaleable using fluid grid layout

    I'm sorry I dont really know how to post a link to this site (its not online just on my laptop) But really all I have is a blank screen I just started trying to build this responsive site (the site I was building wasn't responsive so i had to start over so thats where I'm at. I started a new fluid grid layout in dreamweaver cc I use 24 collums at 100%. I deleted the the div (but not the grid container one) . First is that I'm trying to build a header using the fluid grid layout (my laptop screen is 1920 px wide so I use the full screen because I want my site to take up a users full screen). The issue is when I use a image thats 1920 px width for a header background it test great in the browers meaning it scales correct but when I check it out in the smartphone and tablet preview options within dreamweaver cc the image is chop off. How do I get the image and really the rest of the site to scale and resize correctly not just in full screen for my pc but for tablets smartphones and anyones computer? I'm baffled please help? I hope I'm being clear if not I'll try again I need your help thank you

    Try to keep responses in the original thread, it keeps replies from getting confused.
    http://forums.adobe.com/thread/1430668?tstart=0

  • How Do I Put Pictures anywhere in fluid grid layout??

    Hi,
    I was wondering how you put pictures anywhere you want in fluid grid layout without having to use the fluid grid layout div tag. I find it easier to use the ap div and simply insert pictures and move them freely however when i do that they dont stay in the correct place and the other grids? Is there an easier way?

    Sorry but APDiv tags don't work in Fluid Grid layouts.  That's why Adobe removed them from CC.
    You must use the Fluid Grid divs in your layout to hold your text and images.
    <div class="gridContainer clearfix">
         <div class="div1">
              insert image here...
         </div>
         <div class="div2">
              insert image here...
         </div>
    </div>
    Nancy O.

  • How to Scale Images in a Table in Fluid Grid Layout?

    I copied over a table full of mouseover images into my new fluid grid layout. It all works fine, but in Mobile mode, all the images are compressed horizontally. How do I fix this?
    http://savcp.com/howwemet-fluid.html

    Strip out your table code with F&R.  You could greatly reduce your code & page load by using CSS instead of image swap behaviors.  Same size images would produce a nicer appearance, too.
    Below, I used floated <p> tags as containers for pictures.  Copy & paste this into a new, blank document and SaveAs test.html.  Preview in browsers with various viewport widths to see the effect.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 document</title>
    <style>
    body { background: #222 }
    /**BEGIN PICS**/
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    #pics {
    width: 100%;
    overflow:hidden;
    margin: 55px auto;
    border: 1px solid silver;
    #pics p {
    float: left;
    width: 24%;
    text-align: center;
    /**space between**/
    margin: 0 0.25%;
    border: 1px solid #222;
    #pics img {
    max-width: 100%;
    border: 5px solid #333;
    /**opacity on linked pics**/
    #pics a img {
    /**for pre-IE8**/
    filter: alpha(opacity=90);
    /**for other browsers**/
    opacity: .90;
    /**on mouseover**/
    #pics a img:hover, #pics a img:active, #pics a img:focus {
    filter: alpha(opacity=100);
    opacity: 1.0;
    border-color: #09C;
    /**ADJUST BREAKPOINTS AS REQUIRED**/
    /* Special Rules for Mobiles */
    @media only screen and (max-width: 480px) {
    #pics p{    height:110px;}
    /* Special Rules for Tablets */
    @media only screen and (min-width: 481px) {
    #pics p{    height:175px;}
    /* Special Rules for Desktops */
    @media only screen and (min-width: 600px) {
    #pics p{    height:255px;}
    /**end PICS**/
    </style>
    </head>
    <body>
    <div id="pics">
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="wk3.html">
    <img src="http://savcp.com/images/story/wk2.gif">
    </a></p>
    <p><a href="ss3.html">
    <img src="http://savcp.com/images/story/ss2.gif">
    </a></p>
    <!--end #pics-->
    </div>
    </body>
    </html>
    Nancy O.

  • How do I center an image inside a div tag using fluid grid layout?

    where do I find and what do i use the image properties position when using the fluid grid layout. I'd like to center the image in the mobile page versus th left position in the desktop.

    This is what my css codes looks like where the image is in the div tag:
    #logo_links {
        clear: both;
        float: left;
        margin-left: 0;
        width: 32.2033%;
        display: block;
    This is the html code where the image is:
      </div>
        <div id="logo_links">
          <div align="center">
            <p><img src="../fluidgrid/images/3_7x2logo.jpg" alt="" width="236" height="110" align="left"></p>
          </div>
        </div>
    I'm going to need more detail where to insert the suggested code as I am a newby!
    Thanks

  • Fluid grid layout-how to keep an image on same line as menu

    I am starting a new page and at the header I am trying to have a logo stay on the same line horizontily as the spry menu.
    the spry menu seems to always go under the logo instead.
    I am assuming the log and the menu should be in the same fluid grid layout div? or do I insert another div, but just not have another row checked.
    I am working in CS6 and I am obvousley not a web designer. any imput would be appreciated... thanks...

    Float the logo.
    <img src="logo.jpg" style="float:left">
    Nancy O.

  • How do I get my Fluid Grid Layout page to resizes from portrait to landscape for iPhones?

    Starting in portrait on my iPhone 4, the fluid grid layout page does not resize when I turn to landscape.  After I refresh / resize to fit the page on landscape and then turn the iPhone to portrait, the page resizes just fine.  Everything seems to be working just fine on the desktop, ignoring IE.  Could it be my media query tags?
    If anyone knows a solution, it would be much appreciated.  Thanks.
    Here is my test page: http://www.bedroomandmore.com/1_b_fluidGrid.html
    Here are my media query tags (the first set of rules does not have the media query tag and becomes the default):
    @media only screen and (max-device-width: 480px) and (orientation : landscape) {
    @media only screen and (min-width: 481px) {
    @media only screen and (min-width: 769px) {
    Here is most of my media query CSS:
    @charset "UTF-8";
    /* Simple fluid media
       Note: Fluid media requires that you remove the media's height and width attributes from the HTML
       http://www.alistapart.com/articles/fluid-images/
    img, object, embed, video {
              max-width: 100%;
    /* IE 6 does not support max-width so default to width 100% */
    .ie6 img {
              width:100%;
    /* Mobile Layout: 480px and below.(smartphone portrait) */
    .gridContainer {
              width: 95.4184%;
              padding-left: 0.5907%;
              padding-right: 0.5907%;
    #header {
              clear: both;
              float: left;
              display: block;
              margin-left: 0%;
              width: 72%;
              max-height: 0%;
              display: -moz-box; /* Firefox */
              display: -webkit-box; /* Safari and Chrome */
              display: box;
              border: none;
              top: auto;
              padding-top: 0.25em;
    #menuHorizontal {
              clear: both;
              float: left;
              width: 118%;
              height:100%;
              margin-left: auto;
              position:relative;
              top:-1em;
              display: block;
    #slides {
              clear: both;
              float: left;
              margin-left: 0.1em;
              width: 119%;
              position: relative;
              top: -1em;
              display: block;
                        /*Slides container: Important: Use position:relative; with top:-1em; together to position div.
                                  Set the width of your slides container
                                  Set to    display: none     to prevent content flash*/
    .slides_container {
              clear: both;
              width: 100%;
              display: block;
                        /*Each slide: Important:
                                  Set the width of your slides
                                  If height not specified height will be set by the slide content
                                  Set to     display: block     for original setting
                                  slide_container is container size
                                  slides_container div set the size of the image inside--adjust to fit image in it so it is not cropped*/
    .slides_container div {
              clear: both;
              width: 69%;
              display: block;
              /* Mobile Layout: 480px. (smartphone landscape)
                                  Inherits styles from Mobile Layout 480px.
                                  Set to clear:none; to allow div to shift up
                                  Or set to clear:both; to take a whole row of the screen*/
    @media only screen and (max-device-width: 480px) and (orientation : landscape) {
    .gridContainer {
              width: 95.4184%;
              padding-left: 0.7907%;
              padding-right: 0.7907%;
    #header {
              clear:both;
              float: left;
              display: block;
              margin-left: auto;
              width:100%;
              display: -moz-box; /* Firefox */
              display: -webkit-box; /* Safari and Chrome */
              display: box;
              border: none;
    #menuHorizontal {
              clear:both;
              float: left;
              width: 110%;
              margin-left:auto;
              display: block;
    #slides {
              clear:both;
              float: left;
              margin-left: 0%;
              width: 68%;
              display: block;
                        /*Slides container: Important:
                                  Set the width of your slides container
                                  Set to    display: none     to prevent content flash*/
    .slides_container {
              clear:both;
              float: left;
              width: 100%;
              display: block;
                        /*Each slide: Important:
                                  Set the width of your slides
                                  If height not specified height will be set by the slide content
                                  Set to     display: block     for original setting*/
    .slides_container div {
              clear:both;
              width:69%;
              display: block;
                        /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout.
                                  Set to clear:none; to allow div to shift up
                                  Or set to clear:both; to take a whole row of the screen*/
    @media only screen and (min-width: 481px) {
    .gridContainer {
              width: 95.9456%;
              padding-left: 0.5271%;
              padding-right: 0.5271%;
    #header {
              clear:both;
              float: left;
              display: block;
              margin-left: auto;
              width: 100%;
              display: -moz-box; /* Firefox */
              display: -webkit-box; /* Safari and Chrome */
              display: box;
              border: none;
    #menuHorizontal {
              clear:both;
              float: left;
              margin-left:auto;
              display: block;
    #slides {
              clear:both;
              float: left;
              margin-left: 0%;
              width: 70%;
              display: block;
                        /*Slides container: Important:
                                  Set the width of your slides container
                                  Set to    display: none     to prevent content flash*/
    .slides_container {
              clear:both;
              float: left;
              width: 100%;
              display: block;
                        /*Each slide: Important:
                                  Set the width of your slides
                                  If height not specified height will be set by the slide content
                                  Set to     display: block     for original setting*/
    .slides_container div {
              width: 100%;
              display: block;

    I found the problem.  There is a bug in Safari for iPhone 4.  Use code to fix found at http://stackoverflow.com/a/6379407

  • CSS height property use in Fluid grid layout

    Hi, I'm totally new to fluid grid layout and just got started in it. I have a div tag that has 5px height and I sucessfully applied that and seem fine only on Tablet landscape (1024x768) and Small tablet landscape (800x600), nevertheless it isn't even displaying on Mobile portrait (320x480), Mobile landscape (480x320), Small tablet portrait (600x800) and Tablet portrait (768x1024).
    My coding is below
    index.html
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="fluid.grid.layout/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="fluid.grid.layout/style.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="fluid.grid.layout/respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="LayoutDiv1"></div>
    </div>
    </body>
    </html>
    boilerplate.css
    @charset "utf-8";
    * HTML5 ✰ Boilerplate
    * What follows is the result of much research on cross-browser styling.
    * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
    * Kroc Camen, and the H5BP dev community and team.
    * Detailed information about this CSS: h5bp.com/css
    * Dreamweaver modifications:
    * 1. Commented out selection highlight
    * 2. Removed media queries section (we add our own in a separate file)
    * ==|== normalize ==========================================================
    /* =============================================================================
       HTML5 display definitions
       ========================================================================== */
    article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
    audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
    audio:not([controls]) { display: none; }
    [hidden] { display: none; }
    /* =============================================================================
       Base
       ========================================================================== */
    * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
    * 2. Force vertical scrollbar in non-IE
    * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
    html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
    body { margin: 0; font-size: 13px; line-height: 1.231; }
    body, button, input, select, textarea { font-family: sans-serif; color: #222; }
    * Remove text-shadow in selection highlight: h5bp.com/i
    * These selection declarations have to be separate
    * Also: hot pink! (or customize the background color to match your design)
    /* Dreamweaver: uncomment these if you do want to customize the selection highlight
    *::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
    *::selection { background: #fe57a1; color: #fff; text-shadow: none; }
    /* =============================================================================
       Links
       ========================================================================== */
    a { color: #00e; }
    a:visited { color: #551a8b; }
    a:hover { color: #06e; }
    a:focus { outline: thin dotted; }
    /* Improve readability when focused and hovered in all browsers: h5bp.com/h */
    a:hover, a:active { outline: 0; }
    /* =============================================================================
       Typography
       ========================================================================== */
    abbr[title] { border-bottom: 1px dotted; }
    b, strong { font-weight: bold; }
    blockquote { margin: 1em 40px; }
    dfn { font-style: italic; }
    hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
    ins { background: #ff9; color: #000; text-decoration: none; }
    mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
    /* Redeclare monospace font family: h5bp.com/j */
    pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; }
    /* Improve readability of pre-formatted text in all browsers */
    pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
    q { quotes: none; }
    q:before, q:after { content: ""; content: none; }
    small { font-size: 85%; }
    /* Position subscript and superscript content without affecting line-height: h5bp.com/k */
    sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
    sup { top: -0.5em; }
    sub { bottom: -0.25em; }
    /* =============================================================================
       Lists
       ========================================================================== */
    ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
    dd { margin: 0 0 0 40px; }
    nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
    /* =============================================================================
       Embedded content
       ========================================================================== */
    * 1. Improve image quality when scaled in IE7: h5bp.com/d
    * 2. Remove the gap between images and borders on image containers: h5bp.com/e
    img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
    * Correct overflow not hidden in IE9
    svg:not(:root) { overflow: hidden; }
    /* =============================================================================
       Figures
       ========================================================================== */
    figure { margin: 0; }
    /* =============================================================================
       Forms
       ========================================================================== */
    form { margin: 0; }
    fieldset { border: 0; margin: 0; padding: 0; }
    /* Indicate that 'label' will shift focus to the associated form element */
    label { cursor: pointer; }
    * 1. Correct color not inheriting in IE6/7/8/9
    * 2. Correct alignment displayed oddly in IE6/7
    legend { border: 0; *margin-left: -7px; padding: 0; }
    * 1. Correct font-size not inheriting in all browsers
    * 2. Remove margins in FF3/4 S5 Chrome
    * 3. Define consistent vertical alignment display in all browsers
    button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
    * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
    * 2. Correct inner spacing displayed oddly in IE6/7
    button, input { line-height: normal; *overflow: visible; }
    * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
    table button, table input { *overflow: auto; }
    * 1. Display hand cursor for clickable form elements
    * 2. Allow styling of clickable form elements in iOS
    button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
    * Consistent box sizing and appearance
    input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
    input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
    input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
    * Remove inner padding and border in FF3/4: h5bp.com/l
    button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
    * 1. Remove default vertical scrollbar in IE6/7/8/9
    * 2. Allow only vertical resizing
    textarea { overflow: auto; vertical-align: top; resize: vertical; }
    /* Colors for form validity */
    input:valid, textarea:valid {  }
    input:invalid, textarea:invalid { background-color: #f0dddd; }
    /* =============================================================================
       Tables
       ========================================================================== */
    table { border-collapse: collapse; border-spacing: 0; }
    td { vertical-align: top; }
    /* ==|== primary styles =====================================================
       Author:
       ========================================================================== */
    /* ==|== non-semantic helper classes ========================================
       Please define your styles before this section.
       ========================================================================== */
    /* For image replacement */
    .ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; }
    .ir br { display: none; }
    /* Hide from both screenreaders and browsers: h5bp.com/u */
    .hidden { display: none !important; visibility: hidden; }
    /* Hide only visually, but have it available for screenreaders: h5bp.com/v */
    .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    /* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
    /* Hide visually and from screenreaders, but maintain layout */
    .invisible { visibility: hidden; }
    /* Contain floats: h5bp.com/q */
    .clearfix:before, .clearfix:after { content: ""; display: table; }
    .clearfix:after { clear: both; }
    .clearfix { zoom: 1; }
    /* ==|== print styles =======================================================
       Print styles.
       Inlined to avoid required HTTP connection: h5bp.com/r
       ========================================================================== */
    @media print {
      * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
      a, a:visited { text-decoration: underline; }
      a[href]:after { content: " (" attr(href) ")"; }
      abbr[title]:after { content: " (" attr(title) ")"; }
      .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
      pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
      thead { display: table-header-group; } /* h5bp.com/t */
      tr, img { page-break-inside: avoid; }
      img { max-width: 100% !important; }
      @page { margin: 0.5cm; }
      p, h2, h3 { orphans: 3; widows: 3; }
      h2, h3 { page-break-after: avoid; }
    style.css
    @charset "utf-8";
    /* Simple fluid media
       Note: Fluid media requires that you remove the media's height and width attributes from the HTML
       http://www.alistapart.com/articles/fluid-images/
    img, object, embed, video {
              max-width: 100%;
    /* IE 6 does not support max-width so default to width 100% */
    .ie6 img {
              width:100%;
              Dreamweaver Fluid Grid Properties
              dw-num-cols-mobile:                    4;
              dw-num-cols-tablet:                    8;
              dw-num-cols-desktop:          10;
              dw-gutter-percentage:          25;
              Inspiration from "Responsive Web Design" by Ethan Marcotte
              http://www.alistapart.com/articles/responsive-web-design
              and Golden Grid System by Joni Korpi
              http://goldengridsystem.com/
    /* Mobile Layout: 480px and below. */
    .gridContainer {
              margin-left: auto;
              margin-right: auto;
              width: 85.5%;
              padding-left: 2.25%;
              padding-right: 2.25%;
    #LayoutDiv1 {
              clear: both;
              float: left;
              margin-left: 0;
              width: 100%;
              height:5px;
              display: block;
    /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
    @media only screen and (min-width: 481px) {
    .gridContainer {
              width: 97.5%;
              padding-left: 1.25%;
              padding-right: 1.25%;
    #LayoutDiv1 {
              clear: both;
              float: left;
              margin-left: 0;
              width: 100%;
              height:5px;
              display: block;
    /* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
    @media only screen and (min-width: 769px) {
    .gridContainer {
              width: 98%;
              max-width: 1232px;
              padding-left: 1%;
              padding-right: 1%;
              margin: auto;
    #LayoutDiv1 {
              clear: both;
              float: left;
              margin-left: 0;
              width: 100%;
              display: block;
              height:5px;
              background-color:#FBB829;
    respond.min.js
    /*! Respond.js v1.0.1pre: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs  */
    (function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z<w;z++){y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(y.styleSheet&&y.styleSheet.rawCssText){m(y.styleSheet.rawCssText,x,A);o[x]=true}else{if(!/^([a-zA-Z]+?:(\/\/)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x,B=0,A,C,D,z,F;if(v.length){v+="/"}if(y){H=1}for(;B<H;B++){A=0;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}z=C.split(",");F=z.length;for(;A<F;A++){D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false;try{v=new XMLHttpRequest()}catch(w){v=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this));
    I really do appreciate your efforts to help me solve this problem... Thank you in advance

    Height is determined by content.  I can't think of a single reason to have a div height of 5px because almost nothing will fit inside that small a space without problems. 
    As to why it doesn't show up in other devices, you must have put that style into the Tablet CSS code instead of the default Mobile CSS code.
    Fluid Grids build up from Mobile (applied to everything) with specific rules for Tablets, then Desktops.
    Best advice, use Fluid Grids for layout only.  Use a separate CSS file for content styles.
    Hope this helps,
    Nancy O.

Maybe you are looking for