Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 6th, 2005, 11:06 AM
DjKlax DjKlax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 DjKlax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 40 sec
Reputation Power: 0
Css site design problems

I'm a beginner to Css, actually this is my 1st site in CSS so i got some problems.

My CSS template is displayed in 3 different versions depending on the browser i use...

Here is the CSS code :


Code:
  body { padding: 0pt;
    background-image: url(bg.jpg);
    text-align: center;
    font-family: Verdana,Tahoma,Arial,Trebuchet MS,Sans-Serif,Georgia,Courier,Times New Roman,Serif;
    }

  .container { border: 1px solid rgb(0, 0, 0);
    padding: 0px;
    width: 801px;
    text-align: center;
    background-color: white;
    margin-left: auto;
    margin-right: auto;
    top: 1%;
    }

  #header { padding: 0px;
    width: 100%;
    text-align: right;
    height: 130px;
    }

  #logo { padding: 0px;
    width: 216px;
    height: 90px;
    float: left;
    margin-top: 20px;
    margin-left: 0px;
    }

  #slogan { padding: 5px;
    width: 60%;
    text-align: right;
    font-style: italic;
    font-size: 22px;
    color: rgb(240, 99, 10);
    height: 30px;
    position: relative;
    float: right;
    margin-top: 89px;
    }

  #frimituri { border-top: 1px solid rgb(0, 0, 0);
    border-bottom: 1px solid rgb(0, 0, 0);
    padding: 5px;
    text-align: left;
    color: rgb(255, 255, 255);
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    background-color: rgb(234, 234, 234);
  #frimituri { width: 811px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width:799px;
    }

  a:link, a:visited, a:active { text-decoration: none;
    color: rgb(240, 99, 10);
    background-color: transparent;
    }

  a:hover { text-decoration: none;
    color: rgb(28, 49, 79);
    background-color: transparent;
    }
  #container2 {padding:10px;
    padding-bottom:0px;
    padding-top:0px;
    float:left;
    width:99%;
    height:600px;
    }
  #parte_st { border-right: 1px dotted rgb(0, 0, 0);
    padding-top: 20px;
    width: 20%;
    height: 100%;
    text-align: left;
    color: rgb(255, 255, 255);
    float: left;
    font-size: 14px;
    }
  #footer { border-top: 1px solid rgb(0, 0, 0);
    clear:both;
    width: 100%;
    text-align: center;
    color: rgb(0, 0, 0);
    height: 60px;
    margin-bottom:0px;
    background-color: rgb(234, 234, 234);
    }
  .clear { clear:both;
    line-height:0;
  }


Here is the html :

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>SENS</title>
  <link rel="stylesheet" type="text/css" media="screen"
 href="template.css">
</head>
<body>
<div class="container">
<div id="header">
<div id="logo"> <a href="http://ss.mymd.t-rh.com/index.php"><img
 src="sens_logo.gif" align="left" border="0"></a> </div>
<div id="slogan"> <b>Sloganul intra aici</b> </div>
</div>
<div id="frimituri"> <a href="http://ss.mymd.t-rh.com/index.php">SENS</a>
</div>
<div id="container2">Text
<div id="parte_st"> <li><img src="nav.gif" border="0"><a
 href="/index.html">Main</a></li>
<li><img src="nav.gif" border="0"><a href="/html/proiecte.html">Proiecte</a></li>
<li><img src="nav.gif" border="0"><a href="/html/membri.html">Membri</a></li>
<li><img src="nav.gif" border="0"><a href="/forum/index.php">Forum</a></li>
<li><img src="nav.gif" border="0"><a href="/html/desprenoi.html">Despre
Noi</a></li>
<li><img src="nav.gif" border="0"><a href="/html/linkuri.html">Linkuri</a></li>
<li><img src="nav.gif" border="0"><a href="/html/contact.html">Contact</a></li>
</div>
</div>
<div class="clear">&nbsp;</div>
<div id="footer">Footer</div>
</div>
</body>
</html>


Pictures of the 3 different results :

http://www.afreeimagehost.com/upload/3436/layout_ie6.jpg
http://www.afreeimagehost.com/upload/3436/layout_mozilla.jpg
http://www.afreeimagehost.com/upload/3436/layout_opera.jpg

I want the site to look like it is displayed in Opera.

Can somebody please help me. I want to know where i went wrong.

I hope the answer isn't something like "u'r css is sh*t"

Reply With Quote
  #2  
Old April 6th, 2005, 11:26 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I advise against using three seperate CSS files for each browser.
What happens if someone in Konqueror or Safari accesses your site?
Which styelsheet will they see?

Chances are there's a LOT of duplication between stylesheets anyways.
The common issues caused by different browsers usually surround the rendering of the Box Model. (Something to do with borders and padding and margins and layouts getting all shifted about)

Reply With Quote
  #3  
Old April 6th, 2005, 11:27 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Nevermind, sorry... I mis-read your post.
What I said is still valid, but it does look like you are using one CSS file... good =)

One thing I noticed first, in CSS when the font name has many words, wrap it in quotes. Irrelevant, just something quick I noticed.

font-family: Verdana,Tahoma,Arial,"Trebuchet MS",Sans-Serif,Georgia,Courier,Times New Roman,Serif;

Otherwise, I'm currently testing your code to see what I can do.

Reply With Quote
  #4  
Old April 6th, 2005, 11:46 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I slightly fixed your code.
Your CSS isn't awful and I think it's great that you are trying to use it. Learning how to fine-tune it is the fun/difficult part.

For my own testing, I combined the CSS and HTML.
You don't need to do that.
I also indented your code to match my personal style... =)
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SENS</title>
<!-- <link rel="stylesheet" type="text/css" media="screen" href="template.css">-->
<style type="text/css">
body { 
	padding: 0pt;
	background-image: url(bg.jpg);
	text-align: center;
	font-family: Verdana,Tahoma,Arial,Trebuchet MS,Sans-Serif,Georgia,Courier,Times New Roman,Serif;
}

.container { 
	border: 1px solid rgb(0, 0, 0);
	padding: 0px;
	width: 801px;
	text-align: center;
	background-color: white;
	margin-left: auto;
	margin-right: auto;
	top: 1%;
}

#header { 
	padding: 0px;
	width: 100%;
	text-align: right;
	height: 130px;
}

#logo { 
	padding: 0px;
	width: 216px;
	height: 90px;
	float: left;
	margin-top: 20px;
	margin-left: 0px;
}

#slogan { 
	padding: 5px;
	width: 60%;
	text-align: right;
	font-style: italic;
	font-size: 22px;
	color: rgb(240, 99, 10);
	height: 30px;
	position: relative;
	float: right;
	margin-top: 89px;
}

#frimituri { 
	border-top: 1px solid rgb(0, 0, 0);
	border-bottom: 1px solid rgb(0, 0, 0);
	padding: 5px;
	text-align: left;
	color: rgb(255, 255, 255);
	height: 20px;
	font-size: 12px;
	font-weight: bold;
	background-color: rgb(234, 234, 234);
	width: 811px;
	voice-family: "\"}\"";
	voice-family:inherit;
	width:799px;
}

a:link, a:visited, a:active { 
	text-decoration: none;
	color: rgb(240, 99, 10);
	background-color: transparent;
}

a:hover { 
	text-decoration: none;
	color: rgb(28, 49, 79);
	background-color: transparent;
}

#container2 {
	padding:10px;
	padding-bottom:0px;
	padding-top:0px;
	float:left;
	width:99%;
	height:600px;
}

#parte_st { 
	border-right: 1px dotted rgb(0, 0, 0);
	padding-top: 20px;
	width: 20%;
	height: 100%;
	text-align: left;
	color: rgb(255, 255, 255);
	float: left;
	font-size: 14px;
}

#footer { 
	border-top: 1px solid rgb(0, 0, 0);
	clear:both;
	width: 100%;
	text-align: center;
	color: rgb(0, 0, 0);
	height: 60px;
	margin-bottom:0px;
	background-color: rgb(234, 234, 234);
}

.clear { 
	clear:both;
	line-height:0;
}
</style>
</head>
<body>
	<div class="container">
		<div id="header">
			<div id="logo"> 
				<a href="http://ss.mymd.t-rh.com/index.php"><img src="sens_logo.gif" align="left" border="0"></a> 
			</div>

			<div id="slogan"> 
				<b>Sloganul intra aici</b> 
			</div>
		</div>

		<div id="frimituri"> 
			<a href="http://ss.mymd.t-rh.com/index.php">SENS</a>
		</div>

		<div id="container2">
			Text

			<div id="parte_st"> 
				<li><img src="nav.gif" border="0"><a href="/index.html">Main</a></li>
				<li><img src="nav.gif" border="0"><a href="/html/proiecte.html">Proiecte</a></li>
				<li><img src="nav.gif" border="0"><a href="/html/membri.html">Membri</a></li>
				<li><img src="nav.gif" border="0"><a href="/forum/index.php">Forum</a></li>
				<li><img src="nav.gif" border="0"><a href="/html/desprenoi.html">Despre Noi</a></li>
				<li><img src="nav.gif" border="0"><a href="/html/linkuri.html">Linkuri</a></li>
				<li><img src="nav.gif" border="0"><a href="/html/contact.html">Contact</a></li>
			</div>
		</div>
		<div class="clear">&nbsp;</div>
		<div id="footer">Footer</div>
	</div>
</body>
</html>


A part of your CSS looks like:
Code:
  #frimituri { border-top: 1px solid rgb(0, 0, 0);
    border-bottom: 1px solid rgb(0, 0, 0);
    padding: 5px;
    text-align: left;
    color: rgb(255, 255, 255);
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    background-color: rgb(234, 234, 234);
  #frimituri { width: 811px;
    voice-family: "\"}\"";
    voice-family:inherit;
    width:799px;
    }


You are missing a closing curly-bracket...
better yet, I just took the second #frimituri { out.

What i've done is a start. Your page is rendered a little cleaner in Firefox.

Some tips...

<img src="nav.gif" border="0">

Instead of using border="0" on all the images within that navigation list, change that attribute in the css.
#parte_st li img {
border: 0;
}


Better yet, if this is a list and those nav.gif images are to replace bullets, use CSS to style an unordered list.
I also advise changing #parte_st from a DIV to an UL... you may want to set the margin and padding to zero.

I noticed a lot of your measurements/units are different all over the place. Sometimes percent, sometimes pixel, sometimes pt... I would advise sticking to pixels and percents, pt's tend to get rendered differently on different operating systems.

Reply With Quote
  #5  
Old April 7th, 2005, 12:42 PM
DjKlax DjKlax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 2 DjKlax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 40 sec
Reputation Power: 0
k... Gonna try some of u'r tips... Tnx 4 helping me.

Reply With Quote
  #6  
Old April 8th, 2005, 08:55 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
no problem.
keep in mind, I didn't completely fix your code...
but it's a start.

keep in touch, we all love to help.

Reply With Quote
  #7  
Old April 23rd, 2005, 10:43 PM
amdma2003 amdma2003 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Earth
Posts: 5 amdma2003 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 25 m 3 sec
Reputation Power: 0
Send a message via AIM to amdma2003
You may also want to use CSS hacks in order to use just one CSS. You may want to research on CSS hacks, but the way to do it is "html>body" without the quotes.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > Css site design problems


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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT