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 01-31-2013, 07:28 PM   PM User | #1
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
How to use full width of main page (id="content")

This is my test page so scroll past the @font-face text I'm testing at the top to the boxes.

How can I make use of the whole content id section to get those boxes to 4 wide?

http://www.hrreplacementcushions.com/
taymag is offline   Reply With Quote
Old 01-31-2013, 08:08 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello taymag,
You should know about the box model. See the box model here. The box model says that whatever you put inside an element cannot be larger than that element. margin/padding/border all count when figuring width/height.

Your .entry-content is 68.9% the width of it's parent.
To fit four .product-box's side by side, .entry-content would have to be 1176px wide.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
taymag (01-31-2013)
Old 01-31-2013, 09:44 PM   PM User | #3
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
Thanks! Could I just go with 100%?
taymag is offline   Reply With Quote
Old 01-31-2013, 10:52 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by taymag View Post
Thanks! Could I just go with 100%?
Look how wide the parent is. If you make .entry-content 100% the width of it's parent, do 4 of your boxes fit?
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-31-2013, 10:58 PM   PM User | #5
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
Ya. But the number of boxes wasn't necessarily the reason, it was more to just use the whole width. So will 100% be okay to use? Thanks
taymag is offline   Reply With Quote
Old 01-31-2013, 11:20 PM   PM User | #6
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
Thinking about going another route but figured I'd put it here instead of cluttering up the forum with another similar thread.

How can I expand the id post-7 div to 100% to match up with the primary id?
taymag is offline   Reply With Quote
Old 01-31-2013, 11:28 PM   PM User | #7
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by taymag View Post
Ya. But the number of boxes wasn't necessarily the reason, it was more to just use the whole width. So will 100% be okay to use? Thanks
100% would be fine.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-31-2013, 11:30 PM   PM User | #8
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
How can I expand the post-7 id to full width? I cant seem to find a div in between that is stopping it...

Thanks!
taymag is offline   Reply With Quote
Old 01-31-2013, 11:32 PM   PM User | #9
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by taymag View Post
Thinking about going another route but figured I'd put it here instead of cluttering up the forum with another similar thread.

How can I expand the id post-7 div to 100% to match up with the primary id?

#post-7 inherits it's width from parent #content
You would need to make #content full width of it's parent, #primary.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
taymag (01-31-2013)
Old 01-31-2013, 11:43 PM   PM User | #10
taymag
New Coder

 
Join Date: Mar 2012
Posts: 41
Thanks: 5
Thanked 0 Times in 0 Posts
taymag is an unknown quantity at this point
Thanks
taymag 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 05:53 AM.


Advertisement
Log in to turn off these ads.