Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / June 2003



Tip: Looking for answers? Try searching our database.

newbie question - setting width & height of the page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Xerxes - 25 Jun 2003 19:50 GMT
Hi,
I am new to CSS, so pardon the simple question!
I am trying to set the page width and height so that on a 800x600 screen
it would occupy the whole screen and on higher resolutions it would
leave white spaces on the sides.

On top of the page, I have a logo on the left and a swf to its right.
Below it, I have a navigation menu on the left, want to display content
in the middle, and have another swf on the right.

How can I position these elements to achieve the page layout?

In my index.html, I have set <div>s:

<div id="navigation"></div>  /* in my javascript menu, I can specify
what <div> to show the menu in */
<div id="content"></div>
<div id="banner">
 <object  ....my flash movie #1>
 </object>
</div>
<div id="ad">
 <object  ... my flash movie #2>
 </object>
</div>

and in my stylesheet:

#logo { /* 127x63 image */
position:absolute;
top:30px;
left:30px;
z-index:50
}

#banner { /* 600x100 .swf file */
position:absolute;
top:12px;
left:160px;
text-align:right; /* Netscape 4 hack */
}

#navigation {
position:relative;
width:130px;
height:140px;
left:30px;
top:160px;
}

#ad {
position:absolute;
width:170px;
height:400px;
right:0;
top:160px;
text-align:right;
}

Also, is there any way to change only the content of the "content" div
after a menu item is clicked instead of loading the whole new page,
along with the logo, the swf movies, ...?

Thanks a lot for your help.
Simba - 27 Jun 2003 18:19 GMT
> Hi,
> I am new to CSS, so pardon the simple question!
[quoted text clipped - 60 lines]
>
> Thanks a lot for your help.

I think that you chose a complex solution to align the contents of
your page. It's easy to have problems using CSS that way, especially
if you are a newbie (like me, too).
I read that professional pages' contents are aligned using HTML, not
CSS: precisely, using the tag <TABLE>. You can create an "invisible"
table (with lines of 0 pixels) as complex as you want and put each
element inside each cell.
The tag TABLE has a lot of attributes which let you organize your page
with great precision. You can set - within some limits - the height
and the width of each cell and of the whole table.
My suggestion, so, is to read the reference for the tag TABLE and use
this tag in your page. (Sorry, but I can't suggest you where to find
this reference; I learned what I told you from a newspaper).
Bye

Simba
Stephen Poley - 27 Jun 2003 20:44 GMT
>I think that you chose a complex solution to align the contents of
>your page. It's easy to have problems using CSS that way, especially
[quoted text clipped - 3 lines]
>table (with lines of 0 pixels) as complex as you want and put each
>element inside each cell.

I hope most of the regulars here live reasonably close to a hospital - I
foresee a number of heart attacks. (My troll-meter is beeping, but it's
only showing yellow at present, so I'll ignore it.)

Simba: if you had followed this group for a while, you'd have discovered
that laying out pages with tables is something that was adopted for want
of anything better in the mid-1990's. Professional designers (by which I
mean people who take a professional attitude to their work, rather than
those who get paid) are trying to get *away* from using them for layout.
This may not always be practical, but it is quite certain that tables
are now over-used.

>(Sorry, but I can't suggest you where to find
>this reference; I learned what I told you from a newspaper).

I'm afraid that even the better newspapers are an extremely poor source
for anything remotely technical.

Signature

Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/

Xerxes - 27 Jun 2003 22:59 GMT
> > Hi,
> > I am new to CSS, so pardon the simple question!
[quoted text clipped - 9 lines]
> >
> > In my index.html, I have set <div>s:

<snip...>

> > Also, is there any way to change only the content of the "content" div
> > after a menu item is clicked instead of loading the whole new page,
[quoted text clipped - 18 lines]
>
> Simba

I have a version that uses tables. But it seems that tables are not a
good a way of page layout. I was told CSS is the way to go.
One problem I encountered with my page using tables is that the whole
page has to be loaded every time a menu item is clicked. When a page
like mine that uses images, flash, ... is loaded over and over,
including all the bandwidth-hugging table tags, it leaves a sour taste
in the viewer's mouth which I don't want.
My question was how I could layout my page to be a certain width and
height, and more importantly, how I could just update the content of one
<div> instead of loading the whole page again and again. I know one way
is using <iframe> but I am trying to stay away from frames as well.

Any suggestion to this newbie is greatly appreciated.
Darin McGrew - 27 Jun 2003 23:32 GMT
> One problem I encountered with my page using tables is that the whole
> page has to be loaded every time a menu item is clicked. When a page
> like mine that uses images, flash, ... is loaded over and over,
> including all the bandwidth-hugging table tags, it leaves a sour taste
> in the viewer's mouth which I don't want.

The browser should be able to cache the images, flash, external JavaScript,
external style sheets, etc. The remaining markup should be relatively
light. If not, then maybe the site navigation you're putting on every page
is just too heavy. Or maybe there isn't enough content on each page.
Signature

Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/

   "If a man speaks in a forest and no woman is there to hear him,
    is he still wrong?"

Eric Jarvis - 27 Jun 2003 23:59 GMT
> > One problem I encountered with my page using tables is that the whole
> > page has to be loaded every time a menu item is clicked. When a page
[quoted text clipped - 6 lines]
> light. If not, then maybe the site navigation you're putting on every page
> is just too heavy. Or maybe there isn't enough content on each page.

the other crucial factor is to make sure that the key
content loads first and the "bells and whistles"
after...if you can create a page that grabs the attention
and shows that it will give the viewer what they came for
within the first few seconds then they will wait whilst
further content loads...give them a blank grey box for 20
seconds and they'll go elsewhere

if you must use tables then don't enclose the entire
content in a single table

Signature

eric
www.ericjarvis.co.uk
"Hey Lord don't ask me questions
There ain't no answer in me"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.