SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old September 26th, 2003, 02:38 AM
Clete2 Clete2 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Birmingham, AL, USA
Posts: 4 Clete2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Clete2
New to CSS, CSS is messed up, will not go to top...

Ok. I am new to CSS and not very good at design (I'm your programmer guy)... So I picked up a book from sitepoint.com, the book on CSS. (They only have three books out, so it's not hard to find)...

Well, following the book... I ended up with this:

Quote:
<HTML>

<HEAD>

<link rel="stylesheet" type="text/css" href="style.css" />

</HEAD>

<BODY>

<?php

@mysql_connect("localhost","root","YouDidNotSeeMyPassword");

@mysql_query("USE clete2_site");

$sql = @mysql_query("SELECT * FROM news");

?>

<div class="border-left">

<div class="bar">
<div>Navigation</div>
</div>

<li>Home</li>

</div>

<div class="border-left">

<div class="bar">
<div>Me</div>
</div>

<li><a href="data/resume.php">My Resume</a></li>
<li><a href="data/history.php">My History</a></li>
<li><a href="MailTo:root@clete2.com">Contact Me</a></li>


</div>

<div class="border-left">

<div class="bar">
<div>Scripts</div>
</div>

<li><a href="data/scriptsfree.php">Scripts (free)</a></li>
<li><a href="data/scriptspaclass.php">Scripts (paid)</a></li>

</div>

<div class="border-middle">

<div class="bar">
<div>News</div>
</div>

</div>


<?php

while($myrow = mysql_fetch_array($sql)){

$context = substr($myrow['context'], 0, 100) ."...";

?>

<div class="border-middle">

<div class="bar">
<div><?=$myrow['title']?></div>
</div>

<?=$context?>

</div>

<?php

}

?>

<div class="border-right">

<div class="bar">
<div>Poll</div>
</div>

</div>

</BODY>

</HTML>


style.css:

Quote:
body {

color: #FFFFFF;
background-color: #FFFFFF;

}

a:hover, a:visited {

color: #FFFFFF;
text-decoration: none;

}

a {

text-decoration: none;
color: #000000;

}

.bar {

text-align: center;
font-weight: bold;
padding: 5px 0px 5px 5px;
background-color: #0066CC;

}

.border-left {

border: 2px solid #0092CC;
background-color: #0066CC;
padding-bottom: 10px;
margin-bottom: 20px;
margin-left: 2%;
width: 15%;

}

.border-middle {

border: 2px solid #0092CC;
background-color: #0066CC;
padding-bottom: 10px;
margin-bottom: 20px;
margin-left: 20%;
width: 57%;

}

/*
.border-middle {

position: absolute;
border: 2px solid #0092CC;
background-color: #0066CC;
padding-bottom: 10px;
margin-bottom: 20px;
width: 57%;
margin-left: 18%;
text-align: center;

}

.border-middle-news {

position: absolute;
border: 2px solid #0092CC;
background-color: #0066CC;
margin-bottom: 50px;
width: 57%;
margin-left: 18%;
margin-top: 50px;
text-align: center;

}


*/

.border-right {

border: 2px solid #0092CC;
background-color: #0066CC;
padding-bottom: 10px;
margin-bottom: 20px;
margin-left: 70%;
width: 15%;

}



Now, if you put that in, you will find that they kind of stack downwards on the page going in a diagonal line... Does anyone have any suggestions? (I'm not quite done with the book, but I have scanned the rest and I don't think it explains)... Probably some stupid mistake, but thanks for your time ...

Reply With Quote
  #2  
Old September 26th, 2003, 03:12 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: New to CSS, CSS is messed up, will not go to top...

i don't see what is wrong with the code, but i have to say that this guys at sitepoint are very much amateurs, especially when it comes to css, so, if i where you, i would find another book...

Reply With Quote
  #3  
Old September 26th, 2003, 11:03 AM
Clete2 Clete2 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Birmingham, AL, USA
Posts: 4 Clete2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Clete2
RE: New to CSS, CSS is messed up, will not go to top...

Well, I have not finished the book and that is not what I origionally had, so a lot of the values were different...

And I don't think I will get another book, I think I will just read up online... CSS isn't that hard either...

It uses pixels in the book, but it reccomends percentages, so I think you may be right... but the example in the book did work...

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > New to CSS, CSS is messed up, will not go to top...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway