Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-16-2007, 04:27 AM   PM User | #1
markash
New to the CF scene

 
Join Date: Oct 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
markash is an unknown quantity at this point
Post Floating elements positioning when browser resized

Good Day,

I am trying to develop a typical header, left menu and data style web page. The problem I am having is with the data block since I have made it to float and when the browser is resized to a certain point the data is rendered below the left menu block. Is there a way that I can prevent this?

Regards,
Mark P Ashworth


body {
font-size: 12px;
font-family: Tahoma;
background-color: FFFFFF;
margin: 0 0 0 0;
}

label {
float: left;
padding: 0 0 0 0;
margin: 0 0 0 1em;
width: 10em;
text-align: right;
}

.header {
background-color: #2C3A41;
height: 3em;
}

.logo {
color: white;
font-family: Tahoma;
font-size: 2em;
font-weight: bold;
padding: 0 0 0 1em;
}

.page {
float: left;
padding: 0 0 0 0;
width: 99.9%;
}

.context {
float: left;
padding: 0 0 0 0;
}
.context ul {
padding: 0 0 0 0;
margin: 1em 0 0 0;
list-style: none;
}
.context li {
float: left;
}
.selection {
float: block;
}
.tools {
}

.content {
clear: left;
float: block;
width: 99.5%;
margin-top: 0.5em;
}

.filters {
float: left;
height: 50em;
border-right: 2px solid #BFBAB0;
}

.filters ul {
padding: 0 1em 0 0.5em;
list-style: none;
margin: 0 0 0 0;
}
.filters li {
float: block;
}

.data {
width: 80%;
align: center;
float: left;
margin-left: 1em;
}

.message {
float: block;
margin: 0 0 1em 0;
}

.message p {
padding: 0.5em 0 0.5em 0;
}
.message p.error {
border: 1px solid #AC433A;
background-color: red;
}


<body>

<div class="header">
<span class="logo">Test</span>
</div>
<div class="page">
<div class="context">
<ul>
<li>Home</li>
<li>My Context</li>
</ul>
</div>
<div class="content">
<div class="filters">
<ul>
<li>Home</li>
<li>My Context</li>
<li>My Context</li>
<li>My Context</li>
<li>My Context</li>
<li>My Context</li>
<li>My Context</li>
</ul>
</div>
<div class="data">Some data that could potentially be too long for the section and be displayed under the filters block.
</div>
</div>
</div>
</body>
</html>
markash is offline   Reply With Quote
Old 10-16-2007, 07:41 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Have a look at http://bonrouge.com/2c-hf-fluid.php, there is no such probelm.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 10-16-2007, 01:23 PM   PM User | #3
Afrow UK
Regular Coder

 
Join Date: Dec 2002
Location: UK
Posts: 177
Thanks: 0
Thanked 2 Times in 2 Posts
Afrow UK is an unknown quantity at this point
Possibly a trick is to place an invisible fixed length div in there to force the webpage to have a minimum width.

Stu
__________________
if ($ENV{'QUERY_STRING'} eq "Afrow UK") {
print "$ENV{'QUERY_STRING'} rocks!";
} else {
print qq~$ENV{'QUERY_STRING'} sucks :)~;
}
Afrow UK is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:45 AM.


Advertisement
Log in to turn off these ads.