Reply
Does Anyone Know How To fix This
Old 02-21-2008, 11:04 AM Does Anyone Know How To fix This
andyp's Avatar
Extreme Talker

Posts: 163
Name: andy patterson
I've Got A problem With my CSS I Have two divs one called irightcolumn & rightcolumn. The irightcolumn is the inner right column and right column is the far right column. but its doing the complete opposite and making the rightcolumn the iright column and vice versa .
Any ideas as how to get them the right way round my site is at http://ap-gfx.com/joomla
__________________
My webmaster news & tips blogs with free scripts and tutorials - http://ap-gfx.com
andyp is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 02-21-2008, 11:36 AM Re: Does Anyone Know How To fix This
King Spam Talker

Posts: 1,050
I don't know if this is the right way to do it or not.

I have 3 columns. Two floated left and one floted right.

Then it is just amatter of where you open and close the divs to to get the look and placement correct.

Both of the sites in my sig uses that format. Copy the CSS for a study guide.
colbyt is offline
Reply With Quote
View Public Profile
 
Old 02-21-2008, 11:37 AM Re: Does Anyone Know How To fix This
Webmaster Talker

Posts: 547
Name: Barry O' Brien
Location: Ireland
Try changing the div layer order around put the divs at the top of your html to the bottom and the bottom ones to the top. This could be the problem I have noticed this when doing stuff my self.
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Old 02-21-2008, 11:44 AM Re: Does Anyone Know How To fix This
LadynRed's Avatar
Super Moderator

Posts: 5,973
Location: Tennessee
Of course - I know how to fix it.. but you need to learn how yourself.

Some things that need to be addressed:
- zero out your margins and padding for all elements from the very start.
- avoid putting margins on a floated element that is in the same direction as the float: ie. don't put a right margin on a right-floated box, and the same for a left float. This will cause IE's doubled-float margin bug.
- mind your widths - the sum of the parts inside a container cannot be wider than the container or you'll get float-drop. LEARN THE BOX MODEL !

You have a 5px margin on almost every box, this is not a good practice.
You also have a 300px wide div sitting inside a 200px wide div.. do the math.

Given all that, this works properly:

Quote:
body, #wrapper, #header, ul, li, a, p, #irightcolumn, #rightcolumn, #ileftcolumn, #leftcolumn{
margin: 0;
padding: 0;
}

body,html
{
background-color:#131422;
font-family: verdana;
font-size: 16px;

}
#wrapper
{
width: 920px;
position: relative;

}
#header
{
height: 80px;
background-color: #0099FF;
}
#leftcolumn
{
width: 120px;
height: auto;
float: left;

}
#ileftcolumn
{
width: 400px;
height: auto;
float: left;
/*margin: 5px;*/
margin-top: 0px;
}
#irightcolumn
{
width: 200px;
float: left;
/*height: auto;*/
color: white;

}
#rightcolumn
{
width: 200px;
float: left;
height: auto;
color: #000;
background: white;
/*border: 1px solid red;*/
}
#nav
{
width: 120px;
height: 250px;
border: solid 1px #000000;
/*margin: 5px;*/
background-color: #12102a;
}
#introbox
{
width: 400px;
height: 150px;
border: solid 1px #000000;
/*margin: 5px;*/
background-color: #4e517d;
}
#latestarticles
{
width: 200px;
height: 300px;
border: solid 1px #000000;
/*margin: 5px;*/
}
#login
{
width: 100px;
height: 100px;
border: solid 1px #000000;
/*margin: 5px;*/
}
.banner
{
width: 400px;
height: 60px;
border: solid 1px #000000;
/*margin: 5px;*/
background-color: #c0542e;
}
#newqanda
{
width: 400px;
height: 200px;
border: solid 1px #000000;
/*margin: 5px;*/
}
#xbox360times
{
width: 332px;
height: 170px;
border: solid 1px #000000;
/*margin: 5px;*/
float: left;
}
.boxheader
{ border-bottom: solid 1px #000000;
background-color: #292a4a;
height: 40px;
font-size: 25px;
}
.clear
{
clear: both;
}
.brclear { /* Use a break with this class to clear float containers on both sides */
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
}
.symbol
{
font-family: webdings;
font-size: 35px;
float: left;
}
li.light
{
list-style: none;
background-color: #4e517d;
}
li
{
list-style-type: none;
}
li.dark
{
list-style-type: none;
background-color: #1d1d32;
}
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>[title]</title>

<link href="%5Btitle%5D_files/style.css" rel="stylesheet" type="text/css"><link href="%5Btitle%5D_files/highlighter.css" type="text/css" rel="stylesheet"></head><body>
<div id="header"></div>
<div id="wrapper">
<!-- far left column -->
<div id="leftcolumn">
<div id="nav"></div>
</div><!-- end leftcolumn -->

<!-- center left column -->
<div id="ileftcolumn">
<div id="introbox">Ap-gfx is for programmers,
gamers and graphics artists alike. Our aim is to provide people one
goal.to help them collaborate with other like minded peopl. We have our
own clans dedicated to all sorts of games and tutorals
</div><!-- end intro -->
<div class="banner"></div>
</div><!-- end ileftcolumn -->

<!-- center right column -->
<div id="irightcolumn">
<div id="latestarticles">
<div class="boxheader">
<div class="symbol">8</div>
Latest Articles
</div><!-- end boxheader -->
<ul>

<li class="light">how do i</li>
<li class="dark">lorem</li>
<li class="light">ipsum</li>
<li class="dark">dolar</li>
<li class="light">lorem</li>
<li class="dark">ipsum</li>
<li class="light">dollar</li>
<li class="dark">lorem</li>
<li class="light">ipsum</li>
<li class="dark">dolar</li>
<li class="light">lorem</li>
<li class="dark">ipsum</li>
<li class="light">dollar</li>
<li class="dark">ipsum</li>
</ul>
</div> <!-- end latest articles -->
<!-- <div class="clear"></div> -->
</div><!-- end irightcolumn -->
<!-- far right column -->
<div id="rightcolumn">
Login Box Goes Here
</div><!-- end rightcolumn -->
<br class="brclear" />
</div><!-- end wrapper -->
<!--clear the floats for mozilla firefox -->
<br class="brclear" />
</body>
</html>
Oh.. and that whole header nonsense with the "8 latest articles' - you don't need all those divs, you shouldn't use divs. Use a proper Hx (heading) and use spans to style it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club

Last edited by LadynRed : 02-21-2008 at 11:45 AM.
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Does Anyone Know How To fix This
 

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13760 seconds with 13 queries