Webmaster Forum

Ezilon Directory   Keyword Research Tool   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-18-2007, 12:26 PM   #1 (permalink)
Junior Member
 
digitaloverlay's Avatar
 
Join Date: 12-14-07
Location: Virginia Beach
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

digitaloverlay is liked by many
Send a message via Yahoo to digitaloverlay
CSS Noob needs help

As the title indicates, I am new to CSS and need some help. I am trying to create a three column layout using CSS and it just isn't cooperating. As you can see on this test page http://www.digitaloverlay.com/test/index.htm my columns (right and main) are showing up in different areas of the screen for FF and IE. When I get it just right for one, the other is way off. What am I doing wrong? I finally figured out how to add my header graphic and get the menu to show up as well but it too is off position depending on what browser you use. Here is my source CSS file


do2.css

html{
margin-top:0;

margin-bottom:0;
}

body {
background-image: url("bg7.png");
font-family: times new roman;
font-size: 12 pt;
}

}
a:hover {background-image:url("menubuttonbg1.png");}
li {display:inline}


td {
font-family: times new roman;
font-size: 12 pt;
}
#mainimg{
background-image: url("topimg.png");
float:left;
position:absolute;
left: 300px;
top: 0px;
width: 500px;
height: 175px;


}
#wrapper{
width:100%;
text-align:left;
margin-left:auto;
margin-right:auto;
}
}

#maincol{
width:90%;
float:left;
position:relative;
left: 31px;
top: 176px;
height: 127px;



}

#rightcol{
width:18%;
float:right;
position:static;
right: 10px;
top: 176px;
left: 801px;

}

#leftcol{
float: left;
display:inline;
width:80%;
position:absolute;
left: 10px;
top: 176px;
font-family: times new roman;
font-size: 12 pt;
}

#footer{
float: left;
display:inline;
width:90%;
position:absolute;
left: 20px;
top: 600px;
font-family: times new roman;
font-size: 12 pt;
}


menu.css

#menu
ul
{
float:left;
width:80%;
padding:0;
display:inline

list-style-type:none;

position:absolute;
left: 250px;
top: 170px;

}
a
{

text-decoration:none;
color:white;
background-image:url("menubuttonbg.png");
padding:0.2em 0.8em;
border-right:1px dashed white;
border-left:1px dashed white;
}
a:hover {background-image:url("menubuttonbg1.png");}
li {display:inline}
digitaloverlay is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-19-2007, 04:14 AM   #2 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
You're using a mix of

Code:
position:absolute; position:relative; position:static; /* AND THEN ALSO FLOAT YOU SHOULD STICK TO RELATIVE IMO AND USE DIVS */
Also you've declared this twice, which is kinda wrong because although i know you think you've used it for two different things, it doesn't matter the browser probably picks it up for ALL A ELEMWNTS

Quote:
//this is in do2.css
a:hover {background-image:url("menubuttonbg1.png");}
li {display:inline}
//and is in menu.css
a:hover {background-image:url("menubuttonbg1.png");}
li {display:inline}
When you declare something by the global element name, it applies to all those elements in the document; therefore any <a></a>'s will do what you've asked them to do there. You've tried too many positioning techniques to go with a table. It looks as if you're trying to "colspan" using absolute positioning to me. Just use "colspan" but my main piece of advice would be g to using divs. If you would like to i can write a three column layout for and give you it. You can then work on it to suit you.

Otherwise checkout colspan and see how much easier it would make your table to layout correctly.

HTH's Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:32 AM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.