Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1691 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Getting content box to stretch

Thread title: Getting content box to stretch
Closed Thread    
    Thread tools Search this thread Display Modes  
05-15-2008, 10:11 AM
#1
Nick Lawson is offline Nick Lawson
Status: Member
Join date: Jun 2007
Location:
Expertise:
Software:
 
Posts: 488
iTrader: 0 / 0%
 

Nick Lawson is on a distinguished road

  Old  Getting content box to stretch

www.nick.nixism.com/gta2/

If you have a look at my posts there, you will notice down the bottom they are outside of the content box, how do I fix this?

I am guessing it has something to do with CSS?

Help would be appreciated.

Thanks,
Nick.

05-15-2008, 11:10 AM
#2
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

add <br style="clear:both;" /> just before the </div> of #panel_center_text
that should pull it down.

or, to make this more efficient, add

.clear {
clear:left;
}

to your css and use

<br class="clear" /> instead of <br style="clear:both;" />

05-15-2008, 06:45 PM
#3
<!--Ryan--> is offline <!--Ryan-->
<!--Ryan-->'s Avatar
Status: Member
Join date: Nov 2007
Location: LakeDistrict, England
Expertise:
Software:
 
Posts: 279
iTrader: 3 / 100%
 

<!--Ryan--> is on a distinguished road

  Old

Liam add that is bad practice.

http://www.positioniseverything.net/easyclearing.html use that.

05-15-2008, 07:55 PM
#4
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

I would but not all browsers support :after, or :last-child etc untill there is some major support then I'll still use additional markup.

edit: just found a better way way add overflow:auto to your content div. make sure your content div doesn't have a height attached to it.

that will save me so much time.

05-15-2008, 09:19 PM
#5
<!--Ryan--> is offline <!--Ryan-->
<!--Ryan-->'s Avatar
Status: Member
Join date: Nov 2007
Location: LakeDistrict, England
Expertise:
Software:
 
Posts: 279
iTrader: 3 / 100%
 

<!--Ryan--> is on a distinguished road

  Old

The IE bug is fixed in clearfix. This is why it has height:1% as it triggers hasLayout. Hence IE clears with out the :after so your wrong there.

Also overflow:has some errors with it. Read the sitepoint post.

05-15-2008, 10:59 PM
#6
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

but those errors are easily overcome.

05-16-2008, 01:42 PM
#7
Nick Lawson is offline Nick Lawson
Status: Member
Join date: Jun 2007
Location:
Expertise:
Software:
 
Posts: 488
iTrader: 0 / 0%
 

Nick Lawson is on a distinguished road

  Old

Got it fixed anyway, cheers guys.

05-16-2008, 02:20 PM
#8
Liam is offline Liam
Liam's Avatar
Status: Member
Join date: Dec 2007
Location: Liverpool, UK
Expertise:
Software:
 
Posts: 287
iTrader: 0 / 0%
 

Liam is on a distinguished road

Send a message via MSN to Liam

  Old

I'm interested to know which method you used now, lol.

Anyways, I was thinking the other day, why remove html for semantics when you are just going to use a load of css hacks which is still more bloat.

adding overflow:auto without a height or setting height:100% stops vertical scrollbars, and to stop horizontal, you can add overflow-x:hidden or just make sure your content isn't too wide.

05-17-2008, 07:07 PM
#9
<!--Ryan--> is offline <!--Ryan-->
<!--Ryan-->'s Avatar
Status: Member
Join date: Nov 2007
Location: LakeDistrict, England
Expertise:
Software:
 
Posts: 279
iTrader: 3 / 100%
 

<!--Ryan--> is on a distinguished road

  Old

You remove html elements because with XHTML and CSS you separate content and presentaion.

With clearfix you are not adding more bloat to the code. You set it as a class and then link the element with the class name. You only have to link it instead of writing overflow all the time.

At the end of the day just use what you feel works best for you.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed