efourdee
08-05-2010, 06:37 AM
I am new to the forums and web designing, and trying to learn quickly. Please excuse the confusing ID tags, and probably what is a pretty simple question to answer.
I am having a problem with a div float. I am trying to float left_content2_right to the right of left_content2_title, but it is floating right but staying below left_content2_ body. I tried using clears, but am willing to admit I didnt try the correct one.
HTML:
<div id="left_content2">
<div id="wrapper_leftcontent2_left">
<div id="left_content_2_title">CONTENT</div>
<div id="left_content2_body">CONTENT</div>
</div>
<div id="left_content2_right">CONTENT</div>
</div>
CSS:
#left_content2 {
background-color: #FFF;
width: 420px;
border-top-width: 10px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-color: #e8e8e8;
float: left;
}
#wrapper_leftcontent2_left {
float: left;
height: auto;
width: auto;
}
#left_content_2_title {
width: 284px;
margin-top: 10px;
margin-left: 10px;
background-color: #FFF;
background-image: url(../images/scoreboard.gif);
height: 41px;
}
#left_content2_body {
width: 600px;
margin-top: 10px;
margin-left: 10px;
background-color: #FFF;
}
#left_content2_right {
background-color: #36C;
width: 40px;
margin-top: 10px;
margin-left: 10px;
float: right;
clear: both;
}
Appreciate any help. Also does creating lots of wrapper div's slow down the page loading time? I have a lot of div's set up similar to this on several sections of my page.
I am having a problem with a div float. I am trying to float left_content2_right to the right of left_content2_title, but it is floating right but staying below left_content2_ body. I tried using clears, but am willing to admit I didnt try the correct one.
HTML:
<div id="left_content2">
<div id="wrapper_leftcontent2_left">
<div id="left_content_2_title">CONTENT</div>
<div id="left_content2_body">CONTENT</div>
</div>
<div id="left_content2_right">CONTENT</div>
</div>
CSS:
#left_content2 {
background-color: #FFF;
width: 420px;
border-top-width: 10px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-color: #e8e8e8;
float: left;
}
#wrapper_leftcontent2_left {
float: left;
height: auto;
width: auto;
}
#left_content_2_title {
width: 284px;
margin-top: 10px;
margin-left: 10px;
background-color: #FFF;
background-image: url(../images/scoreboard.gif);
height: 41px;
}
#left_content2_body {
width: 600px;
margin-top: 10px;
margin-left: 10px;
background-color: #FFF;
}
#left_content2_right {
background-color: #36C;
width: 40px;
margin-top: 10px;
margin-left: 10px;
float: right;
clear: both;
}
Appreciate any help. Also does creating lots of wrapper div's slow down the page loading time? I have a lot of div's set up similar to this on several sections of my page.