Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member Damien's Avatar
    Join Date
    Apr 2004
    Location
    Essex, UK
    Posts
    110
    Member #
    5528
    Ok, First time into CSS (and real web design) and I am having the biggest problem known to man! .

    I made the site and then converted to CSS! The only problem is i am having some problems. I wanted to make it fairly simple for my first ever site. However in firefox every thing is on the right (the body of text and the navigation links). In safari it works fine bar a few positioning issues.

    Can u figure out what i am doing wrong? Also does anyone have any useful tips on css in case i make bad code or mistakes

    :ermm:

    Code:
    body {
    	background-color: #FFFFFF;
    	padding: 0px;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	margin: 0px;
    }
    h1 {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 1.4em;
    	color: #330033;
    	border-bottom-width: thin;
    	border-bottom-style: solid;
    	border-bottom-color: #000099;
    }
    h2 {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	margin: 0px;
    	padding: 0px;
    	border-bottom-style: solid;
    	border-bottom-color: #000066;
    	border-bottom-width: thin;
    	font-size: 1.2em;
    	color: #330033;
    }
    text {
    	padding: 0px;
    	float: right;
    	position: absolute;
    	display: block;
    	top: 1.5em;
    	bottom: 0px;
    	left: 12em;
    	right: 0px;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	margin: 0em;
    }
    div#sidebar {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: small;
    	display: block;
    	float: left;
    	padding: 0px;
    	border-top-width: thin;
    	border-right-width: thin;
    	border-top-style: none;
    	border-right-style: none;
    	border-top-color: #000099;
    	border-right-color: #000099;
    	border-bottom-color: #000099;
    	border-left-color: #000099;
    	border-left-style: none;
    	border-left-width: thin;
    	border-bottom-style: none;
    	position: absolute;
    	top: 2.5em;
    	margin: 0em;
    	left: 0px;
    }
    Attached Images Attached Images

  2.  

  3. #2
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    i am assumeing that text is not a real tag correct me if i am wrong so you must have missed a "#" or "." on the beginning eg
    .text
    or
    #text

    border-bottom-style: solid;
    border-bottom-color: #000066;
    border-bottom-width: thin;
    can be made border-bottom:1px #000066 solid;
    to save space
    why float and then call for absolute postioning
    div#sidebar
    this is unnecessary if it works because an id can be used only for a single element try
    #sidebar instead
    Thee Pyro Wolf

  4. #3
    Senior Member Damien's Avatar
    Join Date
    Apr 2004
    Location
    Essex, UK
    Posts
    110
    Member #
    5528
    ok, so my tags are wrong <text> is a really tag shall I change it to <div id="textmain">

    What is the difference between float and absolute positioning? Are they any advantages/disadvantages?

  5. #4
    Senior Member Damien's Avatar
    Join Date
    Apr 2004
    Location
    Essex, UK
    Posts
    110
    Member #
    5528
    note: #textmain makes it work in firefox but not safari. <text> works in safari but not firefox. div#textmain works in both.

    Can someone explain?

  6. #5
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Posts
    183
    Member #
    8318
    <text> is not a tag in the w3c specs. You can define your own tags and use a custom dtd. But if you haven't gone to that effort, then you have to use the tags that are defined in the w3c specs for html.

    There was a web before the w3c and there were many tags that have long since be depracated. Some browsers may still have settings to render these very old tags. The <text> tag may be one of these that safari continues to support. However my googling can find no referances to text tags.

  7. #6
    Senior Member Damien's Avatar
    Join Date
    Apr 2004
    Location
    Essex, UK
    Posts
    110
    Member #
    5528
    so is <div id="something"> a valid tag? And then do i define it as either #something or div#something

  8. #7
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    an id is a name for the tag you are specifying not the actual tag and yes it is vaild code
    Thee Pyro Wolf


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com