Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
1st Attempt At External Sheet Not Working Well
Old 01-11-2009, 05:07 PM 1st Attempt At External Sheet Not Working Well
Skilled Talker

Posts: 66
Trades: 0
This is my first attempt at utilizing an external style sheet and it doesn't seem to be working out to well.

I put together a small page and got it looking and working the way I wanted. I cut the css code from it and put it to a new page for my *.css page.

Now I am putting together a second page. I filled it with junk to make the page bigger than the first so I could see how to make changes to the css for other pages.

Well, in this particular case, I need the height of my 3 columns to be bigger. Originally the *.css file has the heights set around 550px. I tried to change the heights for the new page to 800px and it did absolutely nothing and I can't figure out why.

This is the code for the second page if someone could take a look at it and tell me what I did wrong:

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>About Creative Video Productions</title>
<link rel="stylesheet" type="text/css" href="cvp.css">
    <meta name="robots" content="all">
    <meta name="rating" content="general">
    <meta name="copyright" content="&copy;2007 Creative Video Productions">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
#left: {height: 900px;}
#mid: {height: 900px;}
#right: {height: 900px;}

</style>
</head>
<body>
<div id="container">
<div id="head1"></div>
<div id="head2"></div>
<div id="head3">
<div id="menu">
<ul>
<li><a href="*" title="Home">Home</a></li>
<li><a href="*" title="About Us">About Us</a></li>
<li><a href="*" title="Why Us">Why Us</a></li>
<li><a href="*" title="Services">Services</a></li>
<li><a href="*" title="Pricing">Pricing</a></li>
<li><a href="*" title="Request More Information">Request More Info</a></li>
<li><a href="*" title="Contact Us">Contact Us</a></li>
</ul>
</div></div>
<div style="clear">&nbsp;</div>
<div id="left">
<div id="bar">
<p class="one">This Is For Text</p>
<p class="two">This is where some kind of text will go when I get around to it</p>
<p class="one">More Text Here</p>
<p class="two">This is the place where even more text will go if and when I get to it.</p>
</div></div>
<div style="clear">&nbsp;</div>
<div id="mid">
<h2>About Us</h2>
<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

<p>This is where I will put a description about the company.</p>

<p> Right now this text is just to take up space for demonstration purposes.</p>

</div>
<div id="right">
<p>This are can be used for advertisements or additional text or images if necessary.</p>
</div>
<div id="footer">
<div id="copyright">
&copy; 2007 &nbsp;&nbsp;&nbsp; Creative Video Productions &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; All Rights Reserved<br>
</div>
</div>
</div>
My css page is coded as:
HTML Code:
body {
background-color: rgb(102,102,102);
margin:0;
padding:0;
}
#container { 
background-color: #000;
width:823px;
margin:0 auto;
}
#head1 {
background-image:url('../new/images/head1.jpg');
width: 823px;
height: 157px;
}
#head2 {
background-color: black;
width: 817px;
height: 140px;
border-left: medium solid #CCC;
border-right: medium solid #CCC;
}
#flash {
background-image:url('../new/images/flash.gif');
background-repeat:no-repeat;
width: 816px;
height: 158px;
}
#head3 {
background-image:url('../new/images/nav-bar.jpg');
width: 823px;
height: 40px;
padding-top: 1px;
}
#left {
margin-top: -19px;
float: left;
color: #FFF;
background-image:url('../new/images/left.jpg') repeat-y;
border-left: medium solid #CCC;
width: 208px;
height: 593px;
overflow:auto;
}
#mid {
float: left;
color: #FFF;
background-image:url('../new/images/mid.jpg');
width: 356px;
height: 530px;
padding-left:35px;
padding-right:10px;
text-align: justify;
}
#right {
margin-top: -38px;
float:right;
color: #FFF;
text-align: justify;
background-image:url('../new/images/right.jpg');
border-right: medium solid #CCC;
width: 178px; 
height: 568px;
padding-left:15px;
padding-right:15px;
padding-top: 25px;
}
#footer { 
clear: both;
background-image:url('../new/images/footer.jpg');
width: 823px;
height: 89px;
color: #FFF;
text-align:center;
}
#menu ul li {
margin-top: -7px;
list-style-type: none; 
float: left; 
}
#menu ul li a {
color: #FFF;
font-family: sans-serif;
font-size: 14px;
font-weight: bold;
font-style: italic;
text-decoration: none;
padding: 0px 44px 0px 0px;
}
#menu ul li a:hover{color: black;}

#bar {
margin-top: 25px;
margin-left: 0px;
background-image:url('../new/images/bar.jpg');
background-image: no-repeat;
width: 206px;
height: 535px;
}
#copyright { 
font-family:sans-serif; 
text-align: center;
color: #FFF;
font-size: 11px;
padding-top: 5px;
line-height: 25px;
clear:both;
}
a:link {color:rgb(254,251,154)}
a:visited {color: red}
a:active {color: #FFF}

.clear { clear: both; width: 100%; height: 0; visibility: none;}

p.one {
padding-top: 27px;
padding-left: 25px;
padding-right: 10px;
font-weight: bold;
font-style: italic;
font-size: 19px;
}
p.two {
margin-top: -10px;
padding-left: 25px;
padding-right: 30px;
font-family:sans-serif;
text-align: justify;
font-size: 12px;
}
#list ul li {
  color: rgb(254,251,154);
  margin-left: 30px;
  font-weight: bold;
  line-height: 36pt;
  text-align:left;
}
#model {
background-image: url('../new/images/model2.jpg');
background-repeat: no-repeat;
width: 160px;
height: 455px;
margin-left: 20px;
margin-top: 165px;
}
Any help would be greatly appreciated.

Thanks

Last edited by chrishirst; 01-11-2009 at 06:07 PM..
JustAGuy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-11-2009, 05:10 PM Re: 1st Attempt At External Sheet Not Working Well
AD7863's Avatar
Major Geek

Posts: 435
Name: Artful Dodger
Location: England, UK
Trades: 0
You should have put it all in a code box
__________________

Please login or register to view this content. Registration is FREE
AD7863 is offline
Reply With Quote
View Public Profile Visit AD7863's homepage!
 
Old 01-11-2009, 05:49 PM Re: 1st Attempt At External Sheet Not Working Well
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Have you CLEARED your floats ?? I suspect not.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-11-2009, 11:46 PM Re: 1st Attempt At External Sheet Not Working Well
Skilled Talker

Posts: 66
Trades: 0
Floats are cleared after the headers and after the left & mid columns. Am I missing something here or is my feeble old brain just not catching on?

Thanks
JustAGuy is offline
Reply With Quote
View Public Profile
 
Old 01-12-2009, 01:38 AM Re: 1st Attempt At External Sheet Not Working Well
LBD
Novice Talker

Posts: 10
Trades: 0
There are two ways to use external stylesheets.

One.
Code:
<style type="text/css">
  @import url("StyleSheet.css");
</style>
Two.
Code:
<link rel="stylesheet" type="text/css" href="StyleSheet.css">
Having that said, i tried to adjust the height, and it worked for me. Which browser are you experiencing the problem in?

I would advise ageinst this type of fixed layout, you are better off trying a more flexible layout, which won't require updating just when adding more text to the page, try this 3 Equal Height Columns using Floats

__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by LBD; 01-12-2009 at 01:40 AM.. Reason: Removing colored text caused by the bugged Syntax Highlighting script
LBD is offline
Reply With Quote
View Public Profile Visit LBD's homepage!
 
Old 01-20-2009, 06:56 PM Re: 1st Attempt At External Sheet Not Working Well
Skilled Talker

Posts: 66
Trades: 0
Thanks for all the input. I guess I was just having a major brain fart and I've got it all squared away and working the way I wanted.

Thanks again
JustAGuy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to 1st Attempt At External Sheet Not Working Well
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 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.23369 seconds with 12 queries