
09-22-07, 05:56 AM
|
|
Newbie Coder
|
|
Join Date: May 2006
Location: Bruges, Belgium
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem with layout
The problem: http://rodekruis-brugge.be/login.php.
The red bar at the bottom (with the Copyright notice) should stay under the sidebar on the left. But it won't, and I don't understand why.
Anybody who can help me out here?
__________________
Never do anything you wouldn't want to explain to the paramedics.
|

09-22-07, 10:25 PM
|
|
Newbie Coder
|
|
Join Date: Jun 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
using "position:absolute" on the sidebar takes it out of the design flow. The footer does not know that the side bar exists.
It also make the sidebar inaccessible if the browser window is shorter than the sidebar itself.
The proper way would have been to float the sidebar.
|

09-23-07, 08:02 AM
|
 |
Coding Addict
|
|
Join Date: Aug 2006
Location: Baltimore, MD
Posts: 342
Thanks: 0
Thanked 1 Time in 1 Post
|
|
A quick fix (not ideal, but will work)...
- Give the left side-bar a bottom margin equal to the height of the footer (plus a extra pixels).
- Set the footer to position: absolute; and bottom: 0;
__________________
"Political Correctness is a doctrine, fostered by a delusionary, illogical, liberal minority and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end."
|

11-08-07, 04:57 AM
|
|
Newbie Coder
|
|
Join Date: May 2006
Location: Bruges, Belgium
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm afraid that doesn't do the trick.
It puts the footer at the bottom of the browser window. If the text reaches below the browser window it just sits there on top of the text and it doesn't stay at the bottom when you scroll.
__________________
Never do anything you wouldn't want to explain to the paramedics.
|

11-08-07, 07:30 AM
|
 |
Community Liaison
|
|
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
|
|
You don't need the section /* MAIN */.
Try it like this:
CSS Code:
/* HEADER */ #headercont { position: realitive; top: 0px; left: 0px; width: 100%; height: 120px; z-index: 1; } #headertop { height: 90px; cursor: pointer; } #headermenu { height: 14px; border-top: 1px solid #cc2300; border-bottom: 1px solid #cc2300; background: #e07b7f; } #menu { position: absolute; margin-left: 14px; text-align: center; font: bold 11px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; } #menu a , #menu a:link , #menu a:active , #menu a:visited { text-decoration: none; } #menu a:hover { text-decoration: none; } #menu a.noscript, #menu a.noscript:link, #menu a.noscript:active, #menu a.noscript:visited { color: #000000; background: #e07b7f; } #menu a.noscript:hover { background: #cc2300; } #headerloc { padding-left: 2em; text-transform: lowercase; border-bottom: 1px solid #cc2300; font: 11px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; background: #ffffff; } #headerloc a, #headerloc a:link, #headerloc a:active, #headerloc a:visited, #headerloc a:hover { color: #a01c22; text-decoration: none; } /* SIDEBAR */ #sidebar { float:left; width: 162px; padding: 14px; } #helpen, #geholpen, #quiz, #leftcal, #foto { border: 1px solid #cc2300; padding: 10px; width: 140px; background: white; border-collapse: collapse; font: bold 11px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; text-align: center; margin-bottom: 10px; } #helpen a, #helpen a:link, #helpen a:active, #helpen a:visited, #helpen a:hover, #geholpen a, #geholpen a:link, #geholpen a:active, #geholpen a:visited, #geholpen a:hover, #quiz a, #quiz a:link, #quiz a:active, #quiz a:visited, #quiz a:hover { color: #000000; text-decoration: none; } #leftcal, #foto { font-weight: normal; } #leftcal a, #leftcal a:link, #leftcal a:active, #leftcal a:visited, #foto a, #foto a:link, #foto a:active, #foto a:visited { color: #a01c22; text-decoration: none; } #leftcal a:hover, #foto a:hover { text-decoration: underline; } /* CONTENT */ #content { width: 700px; height: 100%; font: 12px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; float:left; } #content a, #content a:link, #content a:active, #content a:visited { color: #a01c22; text-decoration: none; } #content a:hover { text-decoration: underline; } #content h1 { font: 22px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; margin: 0px; padding-top: 0.5em; border-bottom: 1px solid #cc2300; } #content h2 { font: 18px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; margin: 0px; padding-top: 0.5em; border-bottom: 1px solid #cc2300; } #content h3 { font: bold 16px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; margin: 0px; padding-top: 0.5em; } #content h3 a, #content h3 a:link, #content h3 a:active, #content h3 a:visited, #content h3 a:hover { color: black; text-decoration: none; } #content ul { margin-top: 10px; margin-left: 0px; padding: 0px; list-style: none; } #content div.totop { text-align: right; } #content ul.sitemap { margin-top: 0px; margin-left: 15px; list-style: square; } #content ul.links li { padding-top: 5px; } #content a.mainlink, #content a.mainlink:link, #content a.mainlink:active, #content a.mainlink:visited, #content a.mainlink:hover { color: #000000; text-decoration: none; font: 11px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; } #content div.pict { text-align: center; } #content table.simtable { width: 100%; border-top: 1px solid #cc2300; border-left: 1px solid #cc2300; } #content td.simtabletd { padding: 0.5em; border-bottom: 1px solid #cc2300; border-right: 1px solid #cc2300; } /* FOOTER */ #footer { clear:both; width: 100%; height: 40px; text-align: center; background: #e07b7f; border-top: 1px solid #cc2300; border-bottom: 1px solid #cc2300; margin-top: 50px; padding-top: 0.5em; padding-bottom: 0.5em; font: 11px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; } #footer a, #footer a:link, #footer a:active, #footer a:visited { color: #a01c22; text-decoration: none; } #footer a:hover { text-decoration: underline; } /* TICKER */ #TICKER { display: none; border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc; overflow: hidden; font-weight: bold; } /* MISC */ .error { color: #c30; font-weight: bold; } td.vr_menu { text-align: center; vertical-align: middle; padding: 5px; } .sidecal { font-weight: bold; vertical-align: top; } hr { color: #cc2300; height: 1px; } td.imagetable { width: 140px; height: 140px; text-align: center; vertical-align: middle; } .nowrap { white-space: nowrap; } img.menu { cursor: pointer; } /* DIENSTEN */ .dienstentable { border: 1px solid #cc2300; width: 100%; } th.dienstenheader { font-weight: bold; text-align: center; white-space: nowrap; } td.dienstenrow { padding: 1px; white-space: nowrap; } td.pending { font-style: italic; background: #efefef; font-weight: bold; } td.accepted { font-style: italic; background: #efefef; font-weight: bold; color: green; } td.rejected { font-style: italic; background: #efefef; font-weight: bold; color: red; } /* CALENDAR */ .calendarheading { text-align: center; font-weight: bold; } .calendarcell { text-align: right; vertical-align: top; padding: 5px; cursor: pointer; } #content a.cal:hover { text-decoration: none; }
And you don't need this in your HTML:
Instead do this:
If this is as complex as your layout gets, you could have easily positioned everything in a two column table.
Then use CSS to perform magic on the contents in the table.
__________________
Jerry Broughton
Last edited by job0107; 11-08-07 at 07:47 AM.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|