0

I want to have a strip down the middle of the screen with my websites content as common on many web pages. I don't want to use background images to achieve the look, rather I was thing of having a div tag that would fill the entire height of the screen. I would just set the height of the div using window.innerHeight

Is there a better way to achieve the look I want?

Thanks,
David

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by almostbob
0

Sorry, I don't know what you are trying to describe.

However, I can guess that CSS alone, or a frameset, or a table will do what you want.
CSS is the professional way to do it; a table is the easy way.

0

For example, http://www.soluto.com/
I want the content of my page to be in a stripe that runs down the page. However if the content would not fill the window, I still want the "stripe" to fill the window.

I don't want to use frames, and I'm pretty sure you can't do it with css alone, but I could be wrong.

0

http://www.soluto.com/
I want the content of my page to be in a stripe that runs down the page. However if the content would not fill the window, I still want the "stripe" to fill the window.

That's a simple combination of tables and divs.

I'm pretty sure you can't do it with css alone, but I could be wrong.

CSS can do absolutely anything that a table can do, plus a lot more.

0

simple ... table

Here

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
    <style type="text/css">
	body {background-color:silver}
	table {height:100%; margin:auto; background-color:pink}
    </style>
    <title></title>
  </head>
  <body>
    <table>
      <tr>
        <td>
          CONTENT
        </td>
      </tr>
    </table>
  </body>
</html>

is a toy example.

0
body {background:pink; width:100%; }
.content { background:green; width:80%; margin-left:10%; }

table 21 lines, css 2 lines
If I understand the question,

Edited by almostbob: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.