/    Sign up×
Community /Pin to ProfileBookmark

not good in English, but..

hi everyone,

before I’m getting crazy from CSS, please help me!

I want to built a standart page, top-title, side-menu and content space.

First problem:
Till now I always decleard the exact width and height for every div. Now I tried to built it by persants.
20% – sideMenu div, 80%-Content div.
so it does’nt work. only if I’m changing it to 19%. Why?!

sec problem:
The content space is devided for 2 divs, one above the other. I want to give the top div 60% height, and the secondery – 40%.
In the top div there is a dinamic-table. sometimes its small. In this case – the bottom-div – getting up..
how can I declare it not to move??

I have scrollers in the tow divs if their content is to long.

Thanks!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@KDLAJun 04.2007 — hi everyone,

before I'm getting crazy from CSS, please help me!

I want to built a standart page, top-title, side-menu and content space.

First problem:

Till now I always decleard the exact width and height for every div. Now I tried to built it by persants.

20% - sideMenu div, 80%-Content div.

so it does'nt work. only if I'm changing it to 19%. Why?![/quote]

If this is happening using IE, it is a padding issue. IE adds the padding to the exterior of a div, rather than the interior. Thus, the width is increaseed.

sec problem:

The content space is devided for 2 divs, one above the other. I want to give the top div 60% height, and the secondery - 40%.

In the top div there is a dinamic-table. sometimes its small. In this case - the bottom-div - getting up..

how can I declare it not to move??

I have scrollers in the tow divs if their content is to long.

Thanks![/QUOTE]

You might take a look at this article: http://alistapart.com/articles/footers

Although it applies to footers, it can be adapted to your coding.

KDLA
Copy linkTweet thisAlerts:
@CentauriJun 04.2007 — IE adds the padding to the exterior of a div, rather than the interior. [/QUOTE]

Huh? Adding the padding to the defined width is normal standards behaviour - only IE in quirks mode includes padding within the width.... late night? ?

Any padding, borders or margins applied to any of the divs will increase their width from the stated percentage. Unless you also set these values in percentages as well, you would always have to allow some additional room. A side menu div will typically be a constant width - they tend to look a little strange being fluid, and are harder to control. With a fixed width floated side bar, your main content div doesn't even need a width set at all, just a left margin to clear the side bar and it will automatically fill the remaining space.
Copy linkTweet thisAlerts:
@KDLAJun 04.2007 — Huh? Adding the padding to the defined width is normal standards behaviour - only IE in quirks mode includes padding within the width.... late night? ?[/QUOTE]
Without the code, it's hard to tell. :rolleyes:
×

Success!

Help @ooorit spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...