LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-20-2008, 12:57 AM   #1
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
css and browsers that allow to change the size of the text


I've always used html tables for the layout of my webpages. In an attempt to make proper use of css for the page layout, I'm running into a problem when a user increments the text size (in firefox e.g. with the key combination control-plus).

My page is based on http://tutorials.alsacreations.com/modelesmenus/hd2.htm and it demonstrates the problem that I experience.

If one increases the text size using the browser the text eventually starts overlapping. I solved the issue that the menu disappears behind the actual content by adding a z-index to the menu identifier (#menu) in the css.

However, I'll like the second div (the actual page content) to move down when the text size increases so no overlap occurs.

Does anybody know if this can be achieved? I've played with the position attribute without success.

PS 1:
viewing the source of above page reveals all relevant information so I will not post it here.
PS 2:
I'm a 'beginner' with css, so I might have overlooked something that is very obvious for others.
 
Old 06-20-2008, 02:43 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I had one of the submenu selections overwrap even in the normal size.

Changing the bottom margin from 300 -> 50, you have to increase the size to a ridiculous amount before there is an overlap.

Last edited by jschiwal; 06-20-2008 at 03:20 AM.
 
Old 06-20-2008, 03:47 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
It does not make sense to me to use the bottom attribute as pages usually are read from top to bottom. So in my own page, I've changed it for the second div to top:80px. I've made a few other changes as well (e.g. more horizontal space for the submenus).

It however is beside the point. The second div should basically move down when the first div occupies more space (my view / requirement). One can probably solve it using javascript (if there is something like an ondraw event) but coding is not my first option. Other options?

Last edited by Wim Sturkenboom; 06-20-2008 at 04:01 AM.
 
Old 06-20-2008, 08:07 AM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Try adding a div between the menu and the content as follows:

Code:
<div class="clear"></div>
where the class clear is defined in the css as:

Code:
.clr{clear:both;}
 
Old 06-23-2008, 09:44 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Got to a point where it more or less works; still not 100% satisfied.

Problem originates (in my opinion) from the absolute position of the 'menu' style and and the 'mentions' style. Changing those to static does part of the trick. Next add graemef's second code block to the style of 'mentions' (the seperate style did not work (yet)).
Now only the submenu will overlap.

It has very low priority now and will fiddle another time with it again.

Thanks for the input.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you change KDE's icon text textfield size? registering Linux - Software 4 07-17-2008 11:57 PM
User can't change default text size. gamfa Grafpup 3 06-28-2007 10:21 AM
Browsers supporting CSS features fully vharishankar General 2 08-09-2005 05:49 AM
enlightenment: how to change text size? kak Linux - Software 1 08-10-2004 07:23 AM
Change QT text size drigz Linux - Software 0 08-05-2004 03:28 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration