Web Hosting CSS & Stylesheet Forums

Add Me

User Name
Password
Go Back   CSS & Stylesheet Forums > Related Authoring > DHTML

Welcome to the CSS & Stylesheet Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:



Reply
  #1 (permalink)  
Old 08-28-2008, 02:08 AM
cdoyle
Guest
 
Posts: n/a
Diggs:
Default Use of Floats



OK,
this has been bugging me today, and haven't been able to figure out what I
need to do.

I've attached my HTML and CSS related to the problem.

I have basically a 2 column page with header and footer. The left column is
the menu, and the right column is where everything goes.

In the right column (#mainnoright) , I wanted to nest some other divs.
What I want is inside this div is a grey box (#greybox), that will go across
the top.
Then under greybox, 2 columns (#MainContentText and #quicklinks).

No matter what I do, I can't seem to get #MainContent and #quicklinks to line
up next to each other)
If I try any types of floats on any of them, in DW the border edges for
(#mainnoright) no longer extend down past those nested divs.

What is the correct way to get the layout like I want it, and have it display
right in DW?

<div id="wrapper">
<div id="topbanner">
<h1><img src="images/headerbanner.gif" width="510" height="40" /></h1>
</div>
<div id="menu"><?php require_once('includes/mainnav.php'); ?>
</div>
<div id="faux">
<div id="LeftMenu">
<p>Let Menu Item</p>
<p>&nbsp;</p>
</div>
<div id="mainnoright">
<div id="greybox">
<p><img src="images/welcomebanner.png" alt="" width="600"
height="57" /></p>
</div>
<div id="MainContentText">
<h3>Text Stuff Here</h3>
<p>&nbsp;</p>
</div> <div id="quicklinks">This should line up next to MainContentText,
but instead drops below it.</div>
</div>
</div> <!--End Faux -->
<div id="footer"></div>
</div> <!--End Wrapper -->

<!--

body {
background-color: #dac479;
margin-top: 4px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
--
#mainnav {
width: 100%;
background-color: #60cae4;
padding-bottom: 5px;
--
#menu {
width:100%;
background-color: #016cba;
border-bottom-width: 5px;
border-bottom-style: solid;
border-bottom-color: #60cae4;
--

#wrapper {
width: 800px;
margin-right: auto;
margin-left: auto;
background-color: #FFFFFF;
position: relative;
font-family: Arial, Helvetica, sans-serif;
--
#banner {
margin:0;
padding: 20px;
--
#topbanner {
width: 100%;
--
#LeftMenu {
width: 150px;
float: left;
--
#footer {
height: 1em;
width: 100%;
clear: both;
background-color: #0066CC;
--

#faux {
margin-bottom: 5px;
overflow: auto; /* Paul O Brien Fix for IE www.pmob.co.uk */
width: 100%;
background-image: url(images/brownbg.gif);
background-repeat: repeat-y;
float: left;
--

#mainnoright {
width: 620px;
margin-left: 170px;
padding-right: 2px;
padding-left: 2px;
--
h3 {
color: a96804;
--

#greybox {
background-color: #666666;
width: 619px;
padding-top: 5px;
--
#quicklinks {
width: 100px;
margin-left: 250px;
--
#MainContentText {
width: 200px;
--
-->
</style>

Reply With Quote


Sponsored Links
  #2 (permalink)  
Old 08-28-2008, 03:35 PM
cdoyle
Guest
 
Posts: n/a
Diggs:
Default Re: Use of Floats

anyone have any suggestions?
Reply With Quote


  #3 (permalink)  
Old 08-29-2008, 08:57 AM
Murray *ACE*
Guest
 
Posts: n/a
Diggs:
Default Re: Use of Floats

> If I try any types of floats on any of them, in DW the border edges for
> (#mainnoright) no longer extend down past those nested divs.


Add this to your stylesheet -

#mainnoright { overflow:hidden; --
<!--[if IE]>
#mainnoright { zoom:100%; --
<[endif]-->

It may still not display correctly in CS3, although it will in preview, and
it will in CS4.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"cdoyle" <webforumsuser@macromedia.com> wrote in message
news:g946gi$8ak$1@forums.macromedia.com...
> OK,
> this has been bugging me today, and haven't been able to figure out what I
> need to do.
>
> I've attached my HTML and CSS related to the problem.
>
> I have basically a 2 column page with header and footer. The left column
> is
> the menu, and the right column is where everything goes.
>
> In the right column (#mainnoright) , I wanted to nest some other divs.
> What I want is inside this div is a grey box (#greybox), that will go
> across
> the top.
> Then under greybox, 2 columns (#MainContentText and #quicklinks).
>
> No matter what I do, I can't seem to get #MainContent and #quicklinks to
> line
> up next to each other)
> If I try any types of floats on any of them, in DW the border edges for
> (#mainnoright) no longer extend down past those nested divs.
>
> What is the correct way to get the layout like I want it, and have it
> display
> right in DW?
>
> <div id="wrapper">
> <div id="topbanner">
> <h1><img src="images/headerbanner.gif" width="510" height="40" /></h1>
> </div>
> <div id="menu"><?php require_once('includes/mainnav.php'); ?>
> </div>
> <div id="faux">
> <div id="LeftMenu">
> <p>Let Menu Item</p>
> <p>&nbsp;</p>
> </div>
> <div id="mainnoright">
> <div id="greybox">
> <p><img src="images/welcomebanner.png" alt="" width="600"
> height="57" /></p>
> </div>
> <div id="MainContentText">
> <h3>Text Stuff Here</h3>
> <p>&nbsp;</p>
> </div> <div id="quicklinks">This should line up next to
> MainContentText,
> but instead drops below it.</div>
> </div>
> </div> <!--End Faux -->
> <div id="footer"></div>
> </div> <!--End Wrapper -->
>
> <!--
>
> body {
> background-color: #dac479;
> margin-top: 4px;
> margin-right: 0px;
> margin-bottom: 0px;
> margin-left: 0px;
> --
> #mainnav {
> width: 100%;
> background-color: #60cae4;
> padding-bottom: 5px;
> --
> #menu {
> width:100%;
> background-color: #016cba;
> border-bottom-width: 5px;
> border-bottom-style: solid;
> border-bottom-color: #60cae4;
> --
>
> #wrapper {
> width: 800px;
> margin-right: auto;
> margin-left: auto;
> background-color: #FFFFFF;
> position: relative;
> font-family: Arial, Helvetica, sans-serif;
> --
> #banner {
> margin:0;
> padding: 20px;
> --
> #topbanner {
> width: 100%;
> --
> #LeftMenu {
> width: 150px;
> float: left;
> --
> #footer {
> height: 1em;
> width: 100%;
> clear: both;
> background-color: #0066CC;
> --
>
> #faux {
> margin-bottom: 5px;
> overflow: auto; /* Paul O Brien Fix for IE www.pmob.co.uk */
> width: 100%;
> background-image: url(images/brownbg.gif);
> background-repeat: repeat-y;
> float: left;
> --
>
> #mainnoright {
> width: 620px;
> margin-left: 170px;
> padding-right: 2px;
> padding-left: 2px;
> --
> h3 {
> color: a96804;
> --
>
> #greybox {
> background-color: #666666;
> width: 619px;
> padding-top: 5px;
> --
> #quicklinks {
> width: 100px;
> margin-left: 250px;
> --
> #MainContentText {
> width: 200px;
> --
> -->
> </style>
>


Reply With Quote


  #4 (permalink)  
Old 08-29-2008, 08:57 AM
cdoyle
Guest
 
Posts: n/a
Diggs:
Default Re: Use of Floats

I was just about to post back, that I thought I got it to work with this
#greybox {
background-color: #666666;
width: 619px;
padding-top: 5px;
--
#quicklinks {
width: 100px;
float: right;
--
#MainContentText {
width: 300px;
float: left;
padding-right: 5px;
padding-left: 5px;
--

It displays fine in DW now, and in IE7 (it's an internal site and we only have
IE 6 and 7 here)

So should I leave it like I have it now, or would it be better to go back to
what I had, and apply the code you listed.



Reply With Quote


  #5 (permalink)  
Old 08-29-2008, 08:57 AM
Murray *ACE*
Guest
 
Posts: n/a
Diggs:
Default Re: Use of Floats

Try both - test in the various browsers with different viewport widths. See
which is more robust.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"cdoyle" <webforumsuser@macromedia.com> wrote in message
news:g96ij5$5k2$1@forums.macromedia.com...
>I was just about to post back, that I thought I got it to work with this
> #greybox {
> background-color: #666666;
> width: 619px;
> padding-top: 5px;
> --
> #quicklinks {
> width: 100px;
> float: right;
> --
> #MainContentText {
> width: 300px;
> float: left;
> padding-right: 5px;
> padding-left: 5px;
> --
>
> It displays fine in DW now, and in IE7 (it's an internal site and we only
> have
> IE 6 and 7 here)
>
> So should I leave it like I have it now, or would it be better to go back
> to
> what I had, and apply the code you listed.
>
>
>


Reply With Quote


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:41 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.




Inactive Reminders By Mished.co.uk