Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > css fixed position and scrolling, centering tables

Reply
Thread Tools

css fixed position and scrolling, centering tables

 
 
steffen.mazanek@unibw-muenchen.de
Guest
Posts: n/a
 
      10-27-2003
Hello again,

I have tried very hard to center a table and still
stay xhtml conform. But without success. How do
you reach this? The attribute align="center" is not
xhtml and margin:auto did not center my table.
Any hints are appreciated.
Another problem. Since I use css fixed position I can
not scroll any more. This is really annoying. What
can I do against this?
My page is located at www.steffen-mazanek.de,
the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.

Thank you.
Ciao,
Steffen
 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      10-27-2003
steffen.mazanek wrote:

> Another problem. Since I use css fixed position I can
> not scroll any more.


That is kind of the *point* of position:fixed. If you set position:fixed,
then the position of the element is fixed -- it won't move.

> This is really annoying. What can I do against this?


Don't use position:fixed. Try position:absolute instead.

> the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.


It is a long time since I did any programming in Haskell. Even longer
since I did any reading in German. But from what I can make out, your XML
processing with Haskell looks interesting. Haskell would really be quite a
natural language to use for XML processing.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      10-27-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:


>I have tried very hard to center a table and still
>stay xhtml conform. But without success. How do
>you reach this? The attribute align="center" is not
>xhtml


Yes it is.
It's in XHTML 1.0 Transitional just the same as it's in HTML 4.01
Transitional.
It is not in XHTML 1.0 Strict just the same as it's not in HTML 4.01
Strict.

This is not an XHTML vs HTML issue. It is a strict vs transitional, or
strurctural vs presentational issue.

>and margin:auto did not center my table.


It depends on your browser and doctype. It won't work in IE up to 5.5,
or IE 6 if your doctype triggers quirks mode. It will work in IE6 in
standards mode and in most other modern browsers.

margin: 0 auto; is slightly preferred even if in most cases a value of
auto for top and bottom margins should be the same as a value of zero.

>Another problem. Since I use css fixed position I can
>not scroll any more. This is really annoying. What
>can I do against this?


Then don't use position: fixed. By definition position: fixed; removes
the elements in question from any calculation of whether scrolling
occurs.

>the problem occurs at http://www.steffen-mazanek.de/de/haskell.html.


There's nothing on that page with a class="center", which is the only
style you have with margin: auto;, so obviously nothing will be
centered.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
steffen.mazanek@unibw-muenchen.de
Guest
Posts: n/a
 
      10-27-2003
Hello.

Ok, now I have just the navigation menues as position: fixed and the
content as position:absolute and I still can not scroll

#navigation {
position: fixed;
top: 0; left: 0; right: 0; height: 2em;
padding: 5px 5px 5px;
text-align: center;
}
#specmenu {
position: fixed;
top: 2.1em; left: 0; bottom: 1.6em; right: 85%;
}
#speccontent {
position: absolute;
top: 2.1em; right: 0; bottom: 1.6em; left:15%;
overflow: auto;
padding: 0 1em;
}
#content {
position: absolute;
top: 2.1em; bottom: 1.6em; left: 0; right: 0;
overflow: auto;
padding: 0 0.5em;
}

I think, I need position:fixed for the menues.

> It is a long time since I did any programming in Haskell.


Time for a restart I would say.

> Even longer
> since I did any reading in German. But from what I can make out, your XML
> processing with Haskell looks interesting. Haskell would really be quite a
> natural language to use for XML processing.


Yes, it is fun

Ciao,
Steffen
 
Reply With Quote
 
steffen.mazanek@unibw-muenchen.de
Guest
Posts: n/a
 
      10-27-2003
Hello.

Steve Pugh <(E-Mail Removed)> writes:

> Yes it is.
> It's in XHTML 1.0 Transitional just the same as it's in HTML 4.01
> Transitional.
> It is not in XHTML 1.0 Strict just the same as it's not in HTML 4.01
> Strict.


Hmm.

> This is not an XHTML vs HTML issue. It is a strict vs transitional, or
> strurctural vs presentational issue.


I begin to understand the differences.

> Then don't use position: fixed. By definition position: fixed; removes
> the elements in question from any calculation of whether scrolling
> occurs.


How can I allow the divs content and speccontent for scrolling and
still have the menues at fixed positions?

> There's nothing on that page with a class="center", which is the only
> style you have with margin: auto;, so obviously nothing will be
> centered.


Oh, sorry for the confusion. This page is just an example for
scrolling.


Regards,
Steffen

 
Reply With Quote
 
steffen.mazanek@unibw-muenchen.de
Guest
Posts: n/a
 
      10-27-2003
Oh, by the way, parts of the site are translated already, try the
"English" menu item
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS vs. tables // fixed vs. variable Chris HTML 39 09-28-2006 01:37 AM
css fixed position ppcguy HTML 12 07-24-2005 08:06 PM
centering and css Mopar HTML 7 12-01-2003 10:37 PM
Centering content horizontally AND vertically with CSS? Lenny HTML 1 10-15-2003 11:14 PM
Design Position by tables or CSS: Problem news.frontiernet.net HTML 13 10-05-2003 09:25 PM



Advertisments