CSS columns

K

Keith

Firstly I admit to being a novice at this HTML, and have been trying to get
a two column CSS layout to have a static left column acting as a menu and
staying visible all the time, with the right hand column used for the
content and scrolling. However, try as I may, the left column menu always
scrolls with the content right one. I have looked at many of the sites
belonging to the regular posters here, but they are as ugly and annoying
(just my opinion) as mine is, with the menu persistently scrolling out of
site. Any of the sites I come across on the web that do what I wish to
portray are using frames. So it looks like that may be the way I will have
to go for the design that I want to portray ( a static always visible menu),
but I'm sure I am doing something wrong with my coding and one of you
knowledgeable people will be able to direct me to a non frames CSS site that
uses a static always visible menu.
 
R

rf

Keith said:
Firstly I admit to being a novice at this HTML, and have been trying to get
a two column CSS layout to have a static left column acting as a menu and
staying visible all the time, with the right hand column used for the
content and scrolling. However, try as I may, the left column menu always
scrolls with the content right one. I have looked at many of the sites
belonging to the regular posters here, but they are as ugly and annoying
(just my opinion) as mine is, with the menu persistently scrolling out of
site. Any of the sites I come across on the web that do what I wish to
portray are using frames. So it looks like that may be the way I will have
to go for the design that I want to portray ( a static always visible menu),
but I'm sure I am doing something wrong with my coding and one of you
knowledgeable people will be able to direct me to a non frames CSS site that
uses a static always visible menu.

Position: fixed; is what you are looking for but IE, for one, does not
support this.

Do not use frames.

Live with the fact that a web page is just that, a page. Scroll the page and
the whole thing goes up^

Cheers
Richard.
 
B

brucie

have been trying to get
a two column CSS layout to have a static left column acting as a menu and
staying visible all the time, with the right hand column used for the
content and scrolling. However, try as I may, the left column menu always
scrolls with the content right one.

http://usenet.alt-html.org/fixed-menu.html

"position:fixed" is not supported by IE but you can use the fix for
fixed here: http://devnull.tagsoup.com/fixed/ which seems to work.
 
T

Toby A Inkster

Keith said:
Firstly I admit to being a novice at this HTML, and have been trying to get
a two column CSS layout to have a static left column acting as a menu and
staying visible all the time, with the right hand column used for the
content and scrolling.

Check out David's "Frames - The Problems and Solutions" page. In
particular, the "Replacing the layout aspects of frames" part.

The first solution proposed is IMHO the nicest from an aesthetic point of
view, but falls down in IE5/Win. The second probably a more practical
solution.

<URL:http://dorward.me.uk/www/frames/>
 
A

andy johnson

http://usenet.alt-html.org/fixed-menu.html

"position:fixed" is not supported by IE but you can use the fix for
fixed here: http://devnull.tagsoup.com/fixed/ which seems to work.

What does margin-left:21ex mean? And can a div be used above all of
what you have for a header?

-
Andy

"There would be a lot more civility in this world if people
didn't take that as an invitation to walk all over you"
- (Calvin and Hobbes) (this email addy is never checked...)
 
A

andy johnson


Cool, thanks. Gives me some ideas. I see that you have the right div
first in the first example and the left div first in the second
example. Is there a best way or is it arbitrary? I'm still in the
huh? stage with CSS. I've heard of px and em but ex?

-
Andy

"There would be a lot more civility in this world if people
didn't take that as an invitation to walk all over you"
- (Calvin and Hobbes) (this email addy is never checked...)
 
B

brucie

Cool, thanks. Gives me some ideas. I see that you have the right div
first in the first example and the left div first in the second
example. Is there a best way or is it arbitrary?

its difficult to know the position for the menu <div> without knowing
what the height of the header <div> will be so its easier to float the
menu <div> into position and let the browser work out the placement.

if the height of the header div was known you could just position the
menu <div> down the required amount. it depends on the design.

if the header <div> is just text you cant know how high the menu <div>
should be positioned down because the font height is unknown.

if the header <div> is an image and/or there is some text beside the
image then chances are you could position the menu down the height of
the image plus a bit for a margin. it depends if the header <div>
increased in size depending on the font size or if the image height
was large enough to allow a reasonably large font size without making
the header <div> larger than the image height.

positioning the <div> rather than floating it was used so the menu
<div> could be physically after the content <div> in the markup which
would present the content first rather than the menu to things like
search engines and audio browsers.
I've heard of px and em but ex?

<quote>
The 'ex' unit is defined by the font's 'x-height'. The x-height is so
called because it is often equal to the height of the lowercase "x".
However, an 'ex' is defined even for fonts that don't contain an "x".
</quote> http://www.w3.org/TR/REC-CSS2/syndata.html#ex

i use it so if the font size is increased/decreased the layout will
proportionally adjust to the new font size.

if i used something like % then the menu width would stay the same but
with changes in font size the text may wrap when i don't want it too
or just be a huge blob squeezed into a small area which looks really
crap and hard to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top