Connecting Tech Pros Worldwide Help | Site Map

need help with CSS layout ... see code

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 6th, 2008, 11:35 AM
Ronny
Guest
 
Posts: n/a
Default need help with CSS layout ... see code

Ok,

I did spend tons of time now (as a beginner in css stylecoding) (but making
html pags for many years), to get this right.
But I am overseeing something.

At this link you find a drawing of my wanted layout:

http://img356.imageshack.us/img356/3...hdesignfc1.jpg

description:

-a left column in which I want to put some artwork only (jpg with repeat-y
over the whole heigth of the page!).
-the obvious header
-a MainContent block (in which I now floated my "menu" div and a first
content "cont1" div (- I also tried to take the menu outside the content
block))
-a footer

Whatever I do, I keep getting strange things.
At the moment, for instance, the content and menu texts go through my footer
and go on below it. That is my main problem now.
But some other problems, having to do with absolute and relative positioning
I guess(?), also show up sometimes.

The footer problem, I tried to solve with this concept:
http://www.wddb.com/i_3_A-Footer-at-the-Bottom.html
But somehow, I loose my footer completely than!?!?!

I did go through several internet courses on how to work with css layouts,
but mostly they work with the concept of a fixed width content. And that is
not what I want. I want to desing for 800x600 minimum. And content should be
adapting to larger resolutions/screens.

Maybe you people can have a look below?

thx
Ron

Here is the rough code I use at the moment (sorry for notepad not
structuring this text):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>blabla</title>
<style type="text/css">
<!--
body {
text-align: center;
}
#Wrapper {
text-align: left;
}
#Header {
position:absolute;
left:7%;
top:0px;
width:93%;
height:100px;
z-index:1;
background-color: #00FF00;
text-align: left;
}
#MainContent {
position:absolute;
top:102px;
width:93%;
z-index:1;
background-color: #FFFF00;
left: 7%;
text-align: left;
}
#cont1 {
float: left;
width: 70%;
}
#Menu {
top:102px;
width:20%;
z-index:2;
background-color: #00FFFF;
bottom: 102px;
left: 80%;
text-align: left;
float: right;
}
#Footer {
position:absolute;
left:7%;
width:93%;
height:100px;
z-index:1;
background-color: #FF0000;
bottom: 0px;
}
#LeftPixAchter {
position:absolute;
left:0px;
width:7%;
z-index:5;
background-color: #FFFFFF;
background-image: url(pix/achter.jpg);
background-repeat: repeat-y;
top: 0px;
height: 100%;
float: left;
}
-->
</style>
</head>
<body>
<div id="Wrapper">

<div id="Header"></div>

<div id="MainContent">

<div id="Menu">
test<br />
test<br />
</div>

<div id="cont1">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut
wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper

suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel
eum iriure dolor in hendrerit in vulputate velit esse molestie consequat,
vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et

iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis
dolore te feugait nulla facilisi.</p>
</p>
</div>

</div>

<div id="Footer"></div>
<div id="LeftPixAchter"></div>

</div>
</div>

</body>
</html>



  #2  
Old July 7th, 2008, 01:55 AM
dorayme
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

In article <86d12$4870acdd$541e3344$8782@cache2.tilbu1.nb.hom e.nl>,
"Ronny" <anonymous@discussions.microsoft.comwrote:
Quote:
Ok,
>
I did spend tons of time now (as a beginner in css stylecoding) (but making
html pags for many years), to get this right.
But I am overseeing something.
>
At this link you find a drawing of my wanted layout:
>
http://img356.imageshack.us/img356/3...hdesignfc1.jpg
This the sort of thing you want?

<http://dorayme.890m.com/alt/ronny.html>

--
dorayme
  #3  
Old July 7th, 2008, 02:25 PM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

Hey thx!

Will study your code tonight and try to understand were i did go wrong!
Thx again!

Hans

"dorayme" <doraymeRidThis@optusnet.com.auschreef in bericht
news:doraymeRidThis-This the sort of thing you want?
Quote:
>
<http://dorayme.890m.com/alt/ronny.html>
>
--
dorayme

  #4  
Old July 7th, 2008, 02:45 PM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

Dorayme,

except for the #wrapper you ignore any position declaration.

How is a browser handle it than? Does it standard handle it as 'absolute'?
Or?

thx for your patience!


  #5  
Old July 7th, 2008, 06:55 PM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

Hi Dorayme,

I copied your complete code and filled content and menu with text.
If the menulist that I put in menu is longer than the content text, I get
this:

http://img174.imageshack.us/img174/2536/review1vc8.jpg

???
I think something is still wrong in the code.

Question, why is the heigth of menu set to 100%? It should keep the same
height as content?


Quote:
This the sort of thing you want?
>
<http://dorayme.890m.com/alt/ronny.html>
>
--
dorayme

  #6  
Old July 7th, 2008, 07:15 PM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

Floated content left
Floated menu right
Set a width for both
I added a 'clear both' to the footer.

So I believe i did get rid of the problem from the below picture.
Other suggestions?


  #7  
Old July 8th, 2008, 02:35 AM
dorayme
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

In article <60412$4872651a$541e3344$4204@cache2.tilbu1.nb.hom e.nl>,
"Ronny" <anonymous@discussions.microsoft.comwrote:
Quote:
Hi Dorayme,
>
I copied your complete code and filled content and menu with text.
If the menulist that I put in menu is longer than the content text, I get
this:
>
http://img174.imageshack.us/img174/2536/review1vc8.jpg
>
???
I think something is still wrong in the code.
>
Question, why is the heigth of menu set to 100%? It should keep the same
height as content?
>
>
>
Quote:
This the sort of thing you want?

<http://dorayme.890m.com/alt/ronny.html>

It was just some ideas for you to play with that would do you if your
content is a certain way. To get a truly robust template for this sort
of thing that will work cross browser for every combination of menu and
content and footer and left side text and pics etc is a much much more
daunting challenge and for that you might look at such well titled
articles as:

<http://www.alistapart.com/articles/holygrail>

In my experience, for one's own sites, a lot of questions arise only
merely hypothetically. In other words, if you know that your menu items
are five or six list items deep and you are sure to have a decent amount
of text in the content col, that means nothing is wrong *in the
circimstances* with a template that might well break in other
circumstances.

If you said more about the actual site you are making, perhaps we might
make other suggestions.

--
dorayme
  #8  
Old July 8th, 2008, 05:15 AM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

dorayme,

I will go over the pagelink you suggested.
For the rest, from your example, I now have a more or less working
'template'.

I am rebuilding my site (personal homepage) from the old HTML coding (with
tables and some basic css) to a css/divs based one. Setting up my page
further will ceratinly reveil more problems. And I will see how I deal with
that. For now I try to make an exact copy of my old index.html to the new
one (just as a practice.... after that I will make more design alterations).
Practice is everything I believe.

My old pages are all written out of the bare head with just notepad and it
would never pass any w3 test. Promise me not to laugh about the code and you
may see it ... ;-)
ww2propaganda.eu

I recently did some help working on a history book. For that I made a
separate part of my homepage with some information. Others pointed out to me
that, although working perfect in IE, it sometimes sucked in safari and
firefox.
Quote:
If you said more about the actual site you are making, perhaps we might
make other suggestions.
>
--
dorayme
thx


  #9  
Old July 8th, 2008, 05:35 AM
Ronny
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

daunting challenge and for that you might look at such well titled
Quote:
articles as:
>
<http://www.alistapart.com/articles/holygrail>
>
Indeed a good article that might help me a little further..thx


  #10  
Old July 8th, 2008, 06:55 AM
dorayme
Guest
 
Posts: n/a
Default Re: need help with CSS layout ... see code

In article <a8c9c$4872f5ae$541e3344$18802@cache4.tilbu1.nb.ho me.nl>,
"Ronny" <anonymous@discussions.microsoft.comwrote:
Quote:
Promise me not to laugh about the code and you
may see it ... ;-)
ww2propaganda.eu
I did not laugh at it. I like all that stuff oddly enough... but no time
to examine html/css just now... <g>

--
dorayme
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.