I'm developing a new theme for one of my sites using Xanthia (was working with .750) and having some serious issues with widths. I'm pretty sure I remember reading about this here somewhere before, but a search was fruitless:
The main problem is that in some cases, the "main content" of any page will extend beyond the UA browser window (to the right). This is noticable in the admin.php page specifically - and others. Most of the divs and tables are set to 100% width and there are various paddings and so on set up that could be the problem. But, I'm guessing it is more than that.
Does anyone know what can cause a theme to extend beyond the UA like this? Is this a browser specific problem or a CSS issue? I'm at a loss.
TIA
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
css width issues
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
like?
Code
margin-right:8px;
yes, basically - I have
Code
body {
margin: 0;
}
#mainbody {
padding:8px;
}
#table1 {
width: 100%;
border: 1px solid black;
margin: 0;
padding: 8px;
} -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 676
I seem to remember this problem with DIVs set to 100% where padding or margins have been applied; if none, the DIVs extend as expected to the sides, but with them applied, horizontal scrollbars appear. Note that DIVs by nature expand as far as they can go, ie 100%, so try removing it from the DIVs and avoid using 100% for the centre table cell. If left and right columns are set to a fixed width, the centre column will naturally extend, as if set to 100%.
This occurs in all the standards browsers as far as I can remember, and I believe an inherent problem in the Standard box model, where Width applies to the content, and Margins, Padding, and Borders are added to that; in effect, the box width is 100% + margin + padding + border
Since IE usually implement its own box model (except in IE6 Compliance mode, not the default), where width of a box includes margins, padding, and border widths, and hence taken out of the content, this shouldn't occur.
Both methods have their uses, and it would be nice if CSS had a way to switch between either. -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
gives new meaning to giving 110%... lol
seriously - this is exactly why I love being able to ask these kind of questions here - I know there is some expert here who will give me a great answer!
removing the "100%" from any and all areas has _almost_ solved the problem! At least everything is within the window - I occasionally get a horizontal scroll bar however. Any other tricks I can look for?
(you know, after you pointed it out - I discovered that *knew* that divs are 100% as a default - I just hadn't put 2 and 2 together! - so I changed table2 to a span instead :) ) -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Craig,
One little tip that Lobos provided me with for my xnuclues theme port was that textareas can sometimes force a horizontal scroll bar. This can be fixed with
textarea {
width: 99%;
}
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
thanks Mark!
I've implemented it, but it hasn't helped this particular issue.
hmmm.
- Moderated by:
- Support
