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 11-08-2012, 04:19 PM   PM User | #1
surreal5335
Regular Coder

 
Join Date: May 2008
Posts: 446
Thanks: 23
Thanked 5 Times in 5 Posts
surreal5335 is an unknown quantity at this point
make left and right floated images bleed off screen

I have 3 main elements a main column with content, an image that butts up against on the left side and an image butts up against it on the right side.

When I view this layout in a large screen it looks good, but on a small screen these elements overlap and pushed into a vertical layout of one column.

Since the two side images are purely asthetic, how could I go about having the two side images bleed off the screen when the there is not enough room for them and main column to all lay side by side.

I thought about using background images for my side images but that would make butting them up against the main column very problematic.

Using position absolute would yield similar results as a background image setup.

Any ideas?
surreal5335 is offline   Reply With Quote
Old 11-08-2012, 04:26 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 surreal5335,
If you put all three main elements into a centered containing element, you would be able to stop that float drop.
__________________
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 11-09-2012, 05:18 PM   PM User | #3
surreal5335
Regular Coder

 
Join Date: May 2008
Posts: 446
Thanks: 23
Thanked 5 Times in 5 Posts
surreal5335 is an unknown quantity at this point
Thanks for the reply,

Thats the setup I have now, I guess I should have included the code, sorry about that

HTML
Code:
<div class="body_wrapper">
      <div class="left_bar">
             <img src="images/Derp_Left.jpg">
      </div>
      <div class="main_container">
      <b>
           <b>
                 <div class="right_bar">
                      <img src="images/Derp_Right.jpg">
                </div>
           </b>
     </b>
</div>
*note: I certianly did not put in the <b> tags that appeared on its own, suggestions on how to fix this are greatly appreciated


CSS
Code:
.body_wrapper {
    margin: 0 auto;
    min-width: 1400px;
    width: 90%;
}

.left_bar {
    float: left;
    width: 20%;
}

.left_bar img, .right_bar img {
    width: 100%;
}

.main_container {
    background-color: #221100;
    float: left;
    min-width: 960px;
    padding: 0 0 20px;
    width: 55%;
}

.right_bar {
    float: left;
    width: 20%;
}
I have been reading about responsive grid to make the content fit better across screens. My only concern is that the two side images may be too big or too small in comparision to the main container when its on the small screen (like 14") in order to make it fit.

I would prefer that all three elements dont scale or size down in the small screen, just the side columns bleed off the edge of each side when the screen gets too small leaving the main container centered in the middle.

Thanks a lot
surreal5335 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 01:36 AM.


Advertisement
Log in to turn off these ads.