Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

2 questions - expanding content and display in FF, IE

This is a discussion on "2 questions - expanding content and display in FF, IE" within the Web Page Design section. This forum, and the thread "2 questions - expanding content and display in FF, IE are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 25th, 2007, 10:52
Up'n'Coming Member
Join Date: Feb 2007
Location: Norwich, UK
Age: 23
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
2 questions - expanding content and display in FF, IE

Hello again. I have 2 issues preventing me from making progress with a site. Both hopefully quite basic.

The first is.. how do you get 2 div's (left and right content for example) to expand together? So if there is more content on the left the right also expands and vice versa.



Second query is a display difference in IE and Firefox.

I have a wrapper containing the divs left and right content, so when content is added to left or right, the wrapper expands also.

This is shown correctly when I preview in IE....



However in firefox, the wrapper doesn't expand when the content does.....



Hope you can help!

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old Feb 25th, 2007, 12:45
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Your last question is easy for me. If you have a footer div, then add this code to the css:
Code: Select all
clear: both;
If you do not have a footer div below, then you can add a new div below the floated columns. Whenever you have a floated column or floated div, you need to follow it up with the CLEAR, so the following element doesn't wrap around the float.

So if you don't have a footer use this code after the floated columns:
#clear {clear:both}

Two divs (left and right) can't expand the same amount...
One technique to use to fake it is called 'faux columns'. You use a background image behind the columns in the container div for instance.
Google that term and you'll see what I mean!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 25th, 2007, 13:19
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Sorry Lchad, I think he means two <div>'s extending to the height of the container they're in. This is not normally possible in CSS. A Google search of Faux Columns will get you the information you need to pseudo-acheive the effect you're after. As for the dynamically adjusting content; this is definitely not possible with CSS. CSS is an exact science, so to speak. It's something where you can control what you want and let the rest follow basic rules. Don't get me wrong, CSS is far more powerful than tables and (X)HTML, but you can't expect the same things from the pair.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 25th, 2007, 14:06
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Yeah that's what I meant Ryan, probably didn't explain it correctly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Feb 25th, 2007, 15:20
Up'n'Coming Member
Join Date: Feb 2007
Location: Norwich, UK
Age: 23
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Quote:
Originally Posted by Lchad View Post
Your last question is easy for me. If you have a footer div, then add this code to the css:
Code: Select all
clear: both;
If you do not have a footer div below, then you can add a new div below the floated columns. Whenever you have a floated column or floated div, you need to follow it up with the CLEAR, so the following element doesn't wrap around the float.

So if you don't have a footer use this code after the floated columns:
#clear {clear:both}

Two divs (left and right) can't expand the same amount...
One technique to use to fake it is called 'faux columns'. You use a background image behind the columns in the container div for instance.
Google that term and you'll see what I mean!
Doesn't seem to help. I have clear: both; in the footer and also tried adding a new div before my left and right content called #clear {clear:both} as suggested.

This is the code I have....

Code: Select all
<div id="wrapper">
            <div id="banner">
            </div>
            <div id="navigation">
                <ul>
                    <li><a href='#'>Home</a></li>
                    <li><a href='#'>Forums</a></li>
                    <li><a href='#'>Mens</a></li>
                    <li><a href='#'>Womans</a></li>
                    <li><a href='#'>Roster</a></li>
                    <li><a href='#'>Contact</a></li>
                </ul>
            </div>
            <div id="leftcontent">
                <div id="welcome">
                    <h3></h3>
                </div>
                <div id="news">
                    <h3></h3>
                        <p class="p1">Littering a dark and dreary road lay the past relics of browser-                                     specific tags, incompatible DOMs, and broken CSS support.
                        </p>
                </div>
            </div>
            <div id="rightcontent">
                <div id="google">
                    <h3></h3>
                        <form action="http://www.google.com/search">
                            <input type=hidden name=hl value=en>
                            <input type=hidden name=ie value="ISO-8859-1">
                            <input maxLength=256 size=22 name=q value="">                    
                            <input type=submit value="Google Search" name=btnG> 
                        </form>
                </div>
                <div id="table">
                    <h3></h3>
                </div>
                <div id="resources">
                    <h3></h3>
                </div>
            </div>    
        </div>
    </div>
    <div id="footer">
        <p class="p1">
            eastcoastlacrosse © 2006  |  Web design by <a href="http://www.mattoconnor.co.uk/">Matt OConnor</a>
        </p>
    </div>
and relevent CSS...

Code: Select all
#wrapper {
  width: 608px; 
  background-color: #525252;
  border: 2px solid #FFFFFF;
  margin: 0 auto;
}

#leftcontent {
  clear: both;
  width: 422px;
  background-color: #A02E2E;
  float: left;
  font-size: 0.8em;
}

#rightcontent {
  clear: both;
  width: 186px;
  background-color: #007597;
  float: right;
}

#footer    {
  clear: both;
  margin: 0 auto;
  background: url(images2/footerpic.jpg);
  background-repeat: no-repeat;
  background-position: left;
  width: 716px;
  height: 60px;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Feb 25th, 2007, 15:23
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

You only need the clear:both in the footer. Delete the others.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Feb 25th, 2007, 15:26
Up'n'Coming Member
Join Date: Feb 2007
Location: Norwich, UK
Age: 23
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

still not working in firefox!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Feb 25th, 2007, 16:48
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Try this it worked for me.
Code: Select all
#wrapper {
  width: 608px; 
  background-color: #525252;
  border: 2px solid #FFFFFF;
  margin: 0 auto;
}

#leftcontent {
  clear: both;
  width: 422px;
  background-color: #A02E2E;
  float: left;
  font-size: 0.8em;
}

#rightcontent {
  width: 186px;
  background-color: #007597;
  float:left;
}

#footer    {
  clear: both;
  margin: 0 auto;
  background: url(images2/footerpic.jpg);
  background-repeat: no-repeat;
  background-position: left;
  width: 716px;
  height: 60px;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Feb 25th, 2007, 17:33
Up'n'Coming Member
Join Date: Feb 2007
Location: Norwich, UK
Age: 23
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 questions - expanding content and display in FF, IE

Still no luck unfortunately. I'll just keep removing stuff until I found out where its tripping up.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
expand firefox ie

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How are some websites capable to display javascript content? gurukhel JavaScript Forum 3 Nov 9th, 2007 21:19
CSS Links - Display All Content In One Div (Like Frames) weasel Web Page Design 1 Oct 27th, 2007 05:19
display alternative content welshstew Classic ASP 1 May 10th, 2007 16:35
content area not expanding Lchad Web Page Design 19 Jan 29th, 2007 15:45
How to make an element display above a dynamic content? wood_flower Web Page Design 4 Aug 3rd, 2005 04:42


All times are GMT. The time now is 16:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8