Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Nov 2006
    Location
    Washington, DC
    Posts
    30
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Smile Hi, I have a few questions and would like to find out the answers. thanks

    Hi guys. I've been trying to learn a little about CSS for my site and wants to develop it better before I start producing better quality 3D models and pictures to put up there so I can get the site outta my mind. Currently I'm trying to figure out 2 things...

    1) Is it reccommended that I get rid of all <br /> tags in my site? (I'm asking this cause of a page I went to http://www.hotdesign.com/seybold/26presentational.html)

    2) I am trying to figure out how to make my navbar fixed so it can stay in view as i scroll down the page. Could somebody point me to a link for a guide/tutorials on what I'm trying to learn?

    I know that my site don't have much content yet but that is why I want to have my site developed first. Well without much ado, here is my site, www.freewebs.com/radscientist/

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    1) If possible yes. CSS margins can take the place of the br tags.
    2) You need to look into position:fixed; for your navmenu. IE6 doesn't support this but there are work arounds. Do some searching for "position:fixed in IE6".

    Why are you using any tables at all? Did you read the whole seybold article?
    http://www.hotdesign.com/seybold/
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Nov 2006
    Location
    Washington, DC
    Posts
    30
    Thanks
    3
    Thanked 0 Times in 0 Posts
    ok thanks for the info I'll look it up.

    P.S. the only table I use are just to add the border around the 2 article in the home page. If you see any other table, could you please let me know?

    thanks,
    Will

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You can use CSS to put borders on a div. As for the <br> tags I noticed you are using them to seperate your text to make it readable. You should be using paragraphs like so (border on div is also included). The nonmoving navigation is also implemented. Take a look at how I did it. I had to use conditional comments for IE6. Another term you should look up is "semantics in html".
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>My first styled page</title>
    <style type="text/css">
    html,body {
    height:100%;
    margin:0;
    padding:0;
    border:0;
    }
    
    body {
    padding-left:170px;
    font-family:Georgia, "Times New Roman", Times, serif;
    color:#FFF;
    background-color:#000;
    }
    hr {
    margin:0;
    padding:0;
    border:0;
    border-bottom:2px solid #666666;
    line-height:0px;
    font-size:0;
    }
    #left {
    position:fixed;
    top:2em;
    left:10px;
    width:150px;
    }
    ul.navbar {
    list-style-type:none;
    margin:0;
    padding:0;
    }
    
    ul.navbar li {
    margin:5px;
    padding:2px;
    }
    
    ul.navbar #first {
    text-align:center;
    }
    
    ul.navbar li.spacer {
    background:none;
    margin:0;
    padding:0;
    }
    
    ul.navbar a, ul.navbar a:link,ul.navbar a:visited {
    text-decoration:none;
    color:#FFF;
    }
    
    ul.navbar a:hover {
    text-decoration:underline;
    }
    
    a, a:link, a:visited {
    text-decoration:underline;
    color:#FFF;
    }
    
    a:hover {
    text-decoration:none;
    }
    
    #main {
    padding:5px;
    }
    #content {
    border:3px double #666666;
    padding:5px;
    margin:3px 0;
    }
    
    #content p {
    margin:0;
    padding:5px 0;
    font-size:0.9em;
    }
    
    h2 {
    font-size:160%;
    margin:0;
    padding:10px 0;
    }
    </style>
    <!--[if lte IE 6]>
    <style type="text/css">
    html {
    overflow:hidden;
    }
    body {
    overflow-y:auto;
    }
    #left {
    position:absolute;
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <div id="left">
    	<ul class="navbar">
    		<li id="first"><a href="index.html"> <img src="http://i29.photobucket.com/albums/c275/Radscientist/boredwill1.jpg" style="border:2px solid #666666;" alt=""><br>
    			::Sigh:: I'm Bored </a></li>
    		<li><a href="3d.html">My 3D Skill</a></li>
    		<li><a href="aboutme.html">About Me</a></li>
    		<li><a href="http://users3.smartgb.com/g/g.php?a=s&amp;i=g30-03355-78">Guestbook</a></li>
    	</ul>
    	<hr>
    	<ul class="navbar">
    		<li><a href="http://www.blender3d.org">Blender3D</a></li>
    		<li><a href="http://www.blenderartists.org/forum">Blenderartists</a></li>
    		<li><a href="http://www.freewebs.com">FreeWebs</a></li>
    		<li><a href="http://www.photobucket.com">PhotoBucket</a></li>
    	</ul>
    </div>
    <div id="main">
    	<h1>My Portfolio</h1>
    	<p> I will be developing the site to help create a more professional look and to improve my web design skills. Please go to <a href="aboutme.html">About Me</a> for any informations about me. If you have any comments or opinions you want to relay to me then please use <a href="http://users3.smartgb.com/g/g.php?a=s&amp;i=g30-03355-78">the guestbook</a> (you will be able to send me a private message if you feel you need to) </p>
    	<hr>
    	Just a random article to help lengthen this page enough to scroll and to experiment with other features of CSS.<br>
    	<div id="content">
    		<h2>Fountain of Youth for Fat Mice?</h2>
    		<p>By Jennifer Couzin<br>
    			ScienceNOW Daily News<br>
    			1 November 2006<br>
    		</p>
    		<p> A molecule found in grapes and red wine increased the survival rate of fat mice by 30%, according to a new study. The finding comes as scientists hunt ever harder for a holy grail in anti-aging research: An easy-to-take therapy that mimics the long-life benefits of slashing calories, without the unpleasant nature of that drastic diet. It's not clear yet that this treatment is a magic chalice, but the study suggests that the molecule, called resveratrol, is a potent protector of health and life in mammals. </p>
    		<p> Resveratrol is an antioxidant, a substance that can protect against tissue damage. In the last few years, a team at Harvard Medical School led by molecular biologist David Sinclair has given resveratrol to yeast, flies, and worms, and in every case, the molecule has stretched lifespan (ScienceNOW, 14 July 2004). That's the same outcome scientists have observed for decades in calorie-restricted species (ScienceNOW, 18 January). Researchers have also found that calorie restriction makes a gene called SIR2, or SIRT1 in mammals, more active, which in turn somehow affects metabolism. Sinclair and some others suspect that resveratrol also acts directly or indirectly through SIR2, much like calorie restriction, although other scientists say that hasn't yet been proven. </p>
    		<p> Following their studies in other species, Sinclair and his colleagues set out to test resveratrol's effects on mice. They studied 1-year-old male mice in three groups of 55 animals each: One was put on a standard diet, a second was fed a high-calorie, high-fat diet, and a third got that same high-calorie diet with daily doses of resveratrol. At 2 years of age, 58% of the animals in the second group were dead of natural causes. In the other two groups, only 42% of the animals had died. </p>
    		<p> The scientists also found other benefits in the resveratrol group. The motor skills of the animals treated with resveratrol improved as they aged, and they were indistinguishable from the mice on a normal diet. Perhaps most notably, their livers remained healthy, unlike those of obese animals who didn't get resveratrol, the team reports online today in Nature. "The obese mice lived as long and were much more similar to the lean animals," says Sinclair, who has co-founded a company that's designing resveratrol-based treatments. Sinclair is also testing the effects of resveratrol in lean mice and comparing them to calorie-restricted animals. </p>
    		The results are exciting, says Matt Kaeberlein, a molecular biologist at the University of Washington in Seattle. But he notes that the mice used in the study were inbred, causing them to suffer from just a handful of diseases that typically kill them. It's far from clear whether resveratrol is targeting only those problems or has broader effects, he says. "There's clearly a beneficial effect" of resveratrol, says Cynthia Kenyon, a molecular geneticist at the University of California, San Francisco. She believes it's worth launching a clinical trial testing resveratrol in obese individuals, or those with type 2 diabetes.<br>
    		<hr>
    		<p> Another article <a href="http://news.yahoo.com/s/nm/20061101/hl_nm/dna_pioneer_dc">From the Yahoo News</a> to help lengthen the page some more. </p>
    		<p> By Astrid Zweynert Wed Nov 1, 1:41 PM ET</p>
    		<p>LONDON (Reuters) - A pioneer of Britain's DNA database said on Wednesday it may have grown so far beyond its original purpose that it now risks undermining civil rights.</p>
    		<p>Professor Alec Jeffreys told BBC radio that hundreds of thousands of innocent people's DNA was now held on the database, a disproportionate number of them young black men.</p>
    		<p>The database, set up in 1995, has expanded to 3.6 million profiles, making it the largest in the world.</p>
    		<p>Everyone who has ever been arrested by the police, even if not charged, is obliged to provide a DNA sample for the database, which also includes victims of crime and others who have volunteered a sample to help a criminal investigation.</p>
    		<p>"The real concern I have in the UK is what I see as a sort of 'mission creep,"' said Jeffreys, who developed the techniques for DNA fingerprinting and profiling. When the database was initially established, it was meant to hold DNA from criminals, he added.</p>
    		<p>"Now hundreds of thousands of entirely innocent people are populating that database, people who have come to the police's attention for example by being charged with a crime and subsequently released."</p>
    		<p>The samples were "skewed socioeconomically and ethnically," he said. "In my view that is discriminatory."</p>
    		<p>Civil rights campaigners say a third of black males in England and Wales are on the database. They are also concerned about the lack of public consultation about the database.</p>
    		<p>DNA sampling has helped considerably in improving crime detection, helping to clear up cases that had remained unsolved for years.</p>
    		<p>For all recorded crime, the detection rate is 26 percent when there is no DNA evidence, but 40 percent when there is a sample, according to government data.</p>
    		<p>Jeffrey's comments coincided with the launch of a consultation on Wednesday to ask members of the public about their views on whether the laws allowing police to take, store and analyze DNA should be revised amid concern about a lack of public consultation on the database.</p>
    		<p>The study by the Nuffield Council on Bioethics, an independent research body, follows comments by British Prime Minister
    			Tony Blair this month that a maximum number of people should be included in the database as it was vital for catching serious criminals.</p>
    		<p>The Council said that police have powers, "unrivalled internationally," to take DNA from an arrested person without consent.</p>
    		<p>"We want to hear the public's views on whether storing the DNA profiles of victims and suspects who are later not charged, or acquitted, is justified by the need to fight crime," said Professor Bob Hepple, chairman of the Council.</p>
    		<hr>
    	</div>
    </div>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New Coder
    Join Date
    Nov 2006
    Location
    Washington, DC
    Posts
    30
    Thanks
    3
    Thanked 0 Times in 0 Posts
    THANKS!! now I can use the codes and takes the time to look at it as I put it onto my site and the IE conditional comment is a great addition since most of my family and friends still uses IE (I was worried about browser compatibility with fixed navbar). I have most of my site set up with the code already but I'll finish it after work today (Only the SMC gallery left, I think). I've also fixed most of the <br /> with most of my site and the code does seems a little cleaner, thanks again! G2G to work now.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    In your page you have this line
    Code:
    <link rel="stylesheet" href="mystyle.css">
    change it to
    Code:
    <link rel="stylesheet" href="mystyle.css" type="text/css">
    Last edited by _Aerospace_Eng_; 11-06-2006 at 04:34 PM.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New Coder
    Join Date
    Nov 2006
    Location
    Washington, DC
    Posts
    30
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Ok I will. Though could you please explains why this is better? I don't want to just uses codes but to learn it.

    thanks,
    Will

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Which part did you want an explanation on? As for the most recent thing I told you to change well it you need to give it a type to make it valid coding plus it helps browsers figure out what to do with it.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #9
    New Coder
    Join Date
    Nov 2006
    Location
    Washington, DC
    Posts
    30
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    In your page you have this line
    Code:
    <link rel="stylesheet" href="mystyle.css">
    change it to
    Code:
    <link rel="stylesheet" href="mystyle.css" type="text/css">
    oh sorry it was this post that I wanted to understand. thanks for the tips.

  • #10
    Regular Coder Graft-Creative's Avatar
    Join Date
    Aug 2004
    Location
    Web Designer - North East Lancashire U.K.
    Posts
    842
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Radscientist View Post
    1) Is it reccommended that I get rid of all <br /> tags in my site?
    Not necessarily:

    If you are using <br / > for layout purposes like:

    Code:
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    ..then ditch them and use margins as aero suggested.

    However, if you are using the tag to add semantic meaning to a text, like so:

    Code:
    <p>
    Shall I compare thee to a summer's day?<br />
    Thou art more lovely and more temperate:<br />
    Rough winds do shake the darling buds of May,<br />
    And summer's lease hath all too short a date:<br />
    </p>
    OK, I know that mixes up presentation and semantics, but maybe, just sometimes - presentation actually adds semantic value <br /> is still in the spec for a reason!

    (cue the flames about obscure css5 properties)

    Kind regards,

    Gary


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •