Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Flex and vh understood by CS4?

Guest
Aug 04, 2017 Aug 04, 2017

Copy link to clipboard

Copied

Good afternoon!

Maybe this is one of those (non-existent) dumb questions...  (I haven't done anything with web pages for ... 5-6 years.)

The following code is from:   https://www.quackit.com/css/flexbox/tutorial/create_a_website_layout_with_flexbox.cfm

<!doctype html>

<title>Example</title>

<style>

  * {

   box-sizing: border-box;

  }

  body {

    margin: 0;

  }

  #main {

    display: flex;

    min-height: calc(100vh - 40vh);

  }

  #main > article {

    flex: 1;

  }

  #main > nav,

  #main > aside {

    flex: 0 0 20vw;

    background: beige;

  }

  #main > nav {

    order: -1;

  }

  header, footer, article, nav, aside {

    padding: 1em;

  }

  header, footer {

    background: yellowgreen;

    height: 20vh;

  }

</style>

<body>

  <header>Header</header>

  <div id="main">

    <article>Article</article>

    <nav>Nav</nav>

    <aside>Aside</aside>

  </div>

  <footer>Footer</footer>

</body>

This is my result:

FlexExample.jpg

My results look nothing like the "holy grail" example on the above link.

If "Flex" and "vh" (or box-sizing) are acceptable to CS4 Dreamweaver, then there must be something I need to change in my configuration.

HELP!!

Any suggestions are appreciated.  Thank you!!

Views

474
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 04, 2017 Aug 04, 2017

Where is the closing NAV tag?

Also the DOCTYPE could be updated to <!DOCTYPE html> - the correct HTML5 notation.

Votes

Translate
Community Expert ,
Aug 04, 2017 Aug 04, 2017

Copy link to clipboard

Copied

Forget about viewport units and flexbox in CS4.  You won't have a prayer of seeing anything close. 

If you want to build responsively, switch to Code View and stay there.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 04, 2017 Aug 04, 2017

Copy link to clipboard

Copied

Why won't Dreamweaver render it correctly?

This is what Chrome shows me.  It's not working either.  What am I missing?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>

    <title>All Star Heating & Air</title>

</head>

<style>

  * {

   box-sizing: border-box;

  }

  body {

    margin: 0;

  }

  #main {

    display: flex;

    min-height: calc(100vh - 40vh);

  }

  #main > article {

    flex: 1;

  }

  #main > nav,

  #main > aside {

    flex: 0 0 20vw;

    background: beige;

  }

  #main > nav {

    order: -1;

  }

  header, footer, article, nav, aside {

    padding: 1em;

  }

  header {

    background: white;

    height: 20vh;

  }

  footer {

    background: yellowgreen;

    height: 20vh;

  }

</style>

<body style="background-color: #97959F">

  <header><img src="images/all_star_logo_long3.jpg" alt="LongLogo"></header>

<div id="main">

        <nav>Servicing:

</br></br>

- Carlsbad</br>

- Cardiff</br>

- Del Mar</br>

- Escondido</br>

- Oceanside</br>

- Poway</br>

- San Marcos</br>

- Valley Center</br>

- Vista</br>

& San Diego County</br>

    <article>Article</article>

</br></br>

       <aside>

        Services:

</br></br>

- Repairs all Makes & Models</br>

- Residential & Commercial</br>

- Energy Efficient Upgrades</br>

- Indoor Air Quality Options</br>

- Energy Saving Services</br>

- Free In-Home Estimates</br></aside>

  </div>

    <footer>Footer</footer>

</body>

Really do appreciate your help!!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 04, 2017 Aug 04, 2017

Copy link to clipboard

Copied

Where is the closing NAV tag?

Also the DOCTYPE could be updated to <!DOCTYPE html> - the correct HTML5 notation.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 05, 2017 Aug 05, 2017

Copy link to clipboard

Copied

Thanks!!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 05, 2017 Aug 05, 2017

Copy link to clipboard

Copied

LATEST

seblake  wrote

Why won't Dreamweaver render it correctly?

Because CS4 came out in 2008 & can barely support HTML5 & moderate CSS level 2 properties.    And now you want to toss advanced CSS level 3 at it?  I'm afraid not.  Owing to its age,  CS4's Design View cannot cope with this newer stuff.  Adobe no longer sells, supports or updates CS4.  It's legacy software now.

If you want to use modern coding standards in a visual work space, switch to a modern code editor.   Or like I said in another reply, keep using CS4 in code view only and don't pay attention to visual rendering in DW.   Use Preview in Browser and also check your work in real mobile devices.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines