Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old September 8th, 2007, 03:12 PM   #1
New Member
 

Join Date: Aug 2007
Location: Tempe AZ
Age: 21
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 tigerslicer is on a distinguished road
My navigation breaks my wrapper.

I am having a bit of a problem with my website. When the navigation bar on the side is longer than my content the navigation bar breaks the border of my wrapper. I would like for the wrapper to stretch down to accommodate the sidebar. Can anyone think of a css solution to this problem? Should I just put some <br> tags in my content div to stretch the wrapper? Thanks in advance.


http://www.tigerslicer.com Example of how it should be.
http://www.tigerslicer.com/example Example of it being broken.
tigerslicer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 9th, 2007, 11:34 AM   #2
drd
Reputable Member
 

Join Date: Dec 2005
Location: Hampshire, England, UK
Posts: 118
Thanks: 1
Thanked 2 Times in 2 Posts
Rep Altering Power: 0 drd is on a distinguished road
Re: My navigation breaks my wrapper.

maybe try extra padding at the bottom of the wrapper
__________________
Web Designer
drd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 9th, 2007, 12:15 PM   #3
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: My navigation breaks my wrapper.

You've got a few situations.

The first thing you can try is adding this code to your wrapper div.

overflow: hidden;

If that doesn't do it, I'd suggest you do a more traditional layout. Lose the absolute positioning.

Here's an example of what could be done:
css
Code:
body{

    background-color:#ec7;

    font-family:"Arial Black";

    font-size:.8em;

}

img{

    border:0 none;

}

#wrapper{
    width:90%;
    background:white;
    margin:auto;
    border:dashed 2px #940;
    padding:1em;
    overflow: hidden;
}

#header{

    height:100px;

    width:380px;

    margin:auto;

    text-align:center;

}

#content{
    color:#940;
    margin-left:2em;
    width:75%;
    float: right;
}

#right{
    top:10em;

    left;10em;
    width:15em;
    background-color:#ec7;
    color:#940;
    margin:1em;
    line-height:2;
    float: left;
}



#new{

    color:blue;

    font-size:1.1em;

    font-weight:bold;

    border:dashed 2px #940;

}



#quickversion{

    border:dashed 2px #940;

    margin:2em;

    

}

http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-0106014414817746&dt=1189353904718&lmt=1189353904&format=120x240_as&output=html&correlator=1189353904718&url=http%3A%2F%2Fwww.tigerslicer.com%2Fexample&color_bg=EECC77&color_text=0066CC&color_link=0066CC&color_url=0066CC&color_border=994400&ad_type=text_image&ref=http%3A%2F%2Fwww.webforumz.com%2Fcss-forum%2F58102-my-navigation-breaks-my-wrapper.htm&ui=rc%3A10&cc=100&ga_vid=1383992.1189353905&ga_sid=1189353905&ga_hid=236591689&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=-240&u_his=1&u_java=true&u_nplug=28&u_nmime=110
Embedded Styles from http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-0106014414817746&dt=1189353904718&lmt=1189353904&format=120x240_as&output=html&correlator=1189353904718&url=http%3A%2F%2Fwww.tigerslicer.com%2Fexample&color_bg=EECC77&color_text=0066CC&color_link=0066CC&color_url=0066CC&color_border=994400&ad_type=text_image&ref=http%3A%2F%2Fwww.webforumz.com%2Fcss-forum%2F58102-my-navigation-breaks-my-wrapper.htm&ui=rc%3A10&cc=100&ga_vid=1383992.1189353905&ga_sid=1189353905&ga_hid=236591689&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=-240&u_his=1&u_java=true&u_nplug=28&u_nmime=110

a:link,a:visited,a:hover,a:active{color:#0066cc;cursor:pointer;}body,table,div,ul,li{font-size:10px;margin:0px;padding:0px}body{background-color:transparent;font-family:arial,sans-serif;height:100%}#aus{height:240px;width:120px}#ads{left:3px;position:absolute;top:19px;width:114px}#ads ul{list-style:none;}#ads ul li{clear:both;cursor:pointer;float:left;height:220px;overflow:hidden;width:114px}.ad{margin:0px 2px}.adt{font-size:13px;font-weight:bold;line-height:14px;}.adb{color:#0066cc;display:block;font-size:13px;line-height:14px}.adu{color:#0066cc;font-size:10px;line-height:14px;overflow:hidden;white-space:nowrap}.adc{width:100%;height:220px;table-layout:fixed;overflow:hidden}#att{left:1px;position:absolute;top:1px}#att ul{height:18px;list-style:none;width:92px}#att ul li{float:right}#abgf{background-color:#994400;height:18px;width:56px}#abgt{height:18px;position:relative;width:18px}#abgi{left:2px;position:absolute;top:2px}#aubg{background-color:#eecc77;border:1px solid #994400;display:none;height:238px;width:118px}.bg{background-color:#eecc77;border-color:#994400;border-style:solid;border-width:0px;height:18px;position:absolute;width:18px}#tlc{background-color:#994400;border-left-width:1px;border-top-width:1px;left:0px;top:0px}#trc{background-color:#EECC77;border-right-width:1px;border-top-width:1px;left:101px;top:0px}#blc{background-color:#EECC77;border-bottom-width:1px;border-left-width:1px;left:0px;top:221px}#brc{background-color:#EECC77;border-bottom-width:1px;border-right-width:1px;left:101px;top:221px}#bgtf{border-top-width:1px;left:19px;top:0px;width:82px}#bgbf{border-bottom-width:1px;left:19px;top:221px;width:82px}#bgcf{border-left-width:1px;border-right-width:1px;height:202px;left:0px;top:19px;width:118px}

#tlc .rc_bg div{background-color: #994400}

#tlc .rc_border div{background-color: #994400}

#trc .rc_bg div{background-color: #EECC77}

#trc .rc_border div{background-color: #994400}

#blc .rc_bg div{background-color: #EECC77}

#blc .rc_border div{background-color: #994400}

#brc .rc_bg div{background-color: #EECC77}

#brc .rc_border div{background-color: #994400}

#abgt .curve div{background-color: #994400}
HTML
Code:
<div id="wrapper">
        <div id="header">
            <a href="/"><img src="owenthought.jpg" alt="Owen's Thoughts Banner"></a>
    </div><div id="right">
            <ul>
                <li><a href="contact.html">Contact Info</a></li>
                <li><a href="aboutme.html">About Me</a></li>
                <li><a href="whatisit.html">What is Tigerslicer?</a></li>
                <li><a href="ridiculous.html">Ridiculous</a></li>

                <li><a href="backtrack.html">Back on Track</a></li>
                <li><a href="byu.html">BYU</a></li>
                <li><a href="time.html">Time has Come</a></li>
                <li><a href="home.html">Home</a></li>
            </ul>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <script type="text/javascript"><!--
google_ad_client = "pub-0106014414817746";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "994400";
google_color_bg = "EECC77";
google_color_link = "0066CC";
google_color_text = "0066CC";
google_color_url = "0066CC";
google_ui_features = "rc:10";
//-->
</script>

<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
  </div>

        <div id="content">
            <h1>Look at this mess</h1>

            <p>See ho it goes?</p>
            <div id="quickversion">
                <h2>Quick Version!</h2>
                <ul>
                    <li>Second-hander. Expletive.</li>
                    <li>One time I out a language filter on my browser that put stars in place of any swear words. I replaced them all in my head with the worst words imaginable. Haha.</li>
              </ul>

          </div>
  </div> 
        
</div>
</body>
</html>
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 9th, 2007, 02:52 PM   #4
New Member
 

Join Date: Aug 2007
Location: Tempe AZ
Age: 21
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 tigerslicer is on a distinguished road
Re: My navigation breaks my wrapper.

Thank you so much that totally solved my problem.
I put in the overflow:hidden and turned off the absolute positioning and floated my content div and now it works great! I didn't even have to change any of my html.

Here is my new CSS:
Code:
body{
    background-color:#ec7;
    font-family:"Arial Black";
    font-size:.8em;
}
img{
    border:0 none;
}
#wrapper{
    width:90%;
    background:white;
    margin:auto;
    border:dashed 2px #940;
    padding:1em;
    overflow: hidden;
}
#header{
    height:100px;
    width:380px;
    margin:auto;
    text-align:center;
}
#content{
    color:#940;
    margin-left:2em;
    width:80%;
    float: right;
}
#right{
    top:10em;
    left;10em;
    width:15em;
    background-color:#ec7;
    color:#940;
    margin:1em;
    line-height:2;
}

#new{
    color:blue;
    font-size:1.1em;
    font-weight:bold;
    border:dashed 2px #940;
}

#quickversion{
    border:dashed 2px #940;
    margin:2em;
    
}
tigerslicer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 9th, 2007, 04:15 PM   #5
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: My navigation breaks my wrapper.

That's GREAT! Any questions??
Lchad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 9th, 2007, 10:06 PM   #6
New Member
 

Join Date: Aug 2007
Location: Tempe AZ
Age: 21
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 tigerslicer is on a distinguished road
Re: My navigation breaks my wrapper.

Yeah actually. Can you explain what the overflow:hidden; part does. I looked it up and it didn't make much sense.
tigerslicer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old September 10th, 2007, 06:58 AM   #7
Elite Veteran
 

Join Date: Sep 2006
Location: Pink House
Posts: 3,941
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all Lchad is a name known to all
Re: My navigation breaks my wrapper.

The overflow portion of the code makes any of the content that is longer than the box, push the box(wrapper) down.. Expands it. The hidden portion says, "do not show a scroll bar"!
Lchad is offline  
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

Bookmarks

Tags
css , layout


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
wrapper not detecting content saltedm8 HTML, XHTML and CSS 6 January 5th, 2009 08:51 AM
Wrapper problem goldy HTML, XHTML and CSS 2 May 30th, 2008 03:11 PM
horizontal list navigation breaks when load times are slow sch3dana HTML, XHTML and CSS 14 March 19th, 2008 09:56 AM
overhanging an imge in a wrapper div lister110 How is this done? 1 January 13th, 2008 02:24 PM
Trying to align a div in a wrapper AdRock HTML, XHTML and CSS 7 February 22nd, 2007 12:03 PM


Search Engine Optimization by vBSEO 3.2.0 RC8