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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member misterphotoshop's Avatar
    Join Date
    Jul 2004
    Posts
    289
    Member #
    6538
    hello everyone. I am in need of some help.
    Last edited by misterphotoshop; Apr 07th, 2015 at 01:39 PM.

  2.  

  3. #2
    Member
    Join Date
    Jan 2005
    Posts
    97
    Member #
    8727
    Can I please see a demo? Also, I think maybe you may be better off using divs for most of your stuff, not spans.

  4. #3
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Code:
    html, body { 
    
       text-align: center; 
       margin: 0;
       padding: 0;
    
    }
    
    #header {
    
       background: #fff url('header.gif') no-repeat;
    
       width: 500px;
       height: 60px;
    
       position: absolute;
       top: 35px;
    
       border: 1px solid #ccc;
    
       margin: 0 auto;
    
    }
    Code:
    <div id="header">
    <span class="header_text">CSS is Good</span>
    <span class="header_text2">Marcel Prunean</span>
    </div>
    <span>'s are inline, they automatically wrap themselves to the content you place inside it, as such you cannot define a width or height unless you change it's properties using display: block; ...However you may as well just use a <div> container in the first place as it already renders as a block element by default.

    It's also a good idea not to use Under_Scores in .class or #id names as different browsers tend to have bugs or other discrepancies etc.

    Hope this helps.

  5. #4
    Senior Member misterphotoshop's Avatar
    Join Date
    Jul 2004
    Posts
    289
    Member #
    6538
    Ok thank you Im all kinda new to designing layouts with css. Now how do I go about making it center algined?

  6. #5
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    margin: 0 auto; is what centres the header.

  7. #6
    Senior Member misterphotoshop's Avatar
    Join Date
    Jul 2004
    Posts
    289
    Member #
    6538
    but its not center aligned. Its right aligned.

  8. #7
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    Can we see your code in a working environment?

  9. #8
    Senior Member Jack000's Avatar
    Join Date
    Aug 2004
    Posts
    250
    Member #
    7173
    I think ie has problems with margin: 0 auto

    try using text-align: center; on the parent element.
    This is actually incorrect code but ie seems to treat inline and block level elements the same when it comes to this property.

    note that the child element would need to have text-align: left; because alignment is inhereted.

  10. #9
    Junior Member
    Join Date
    Apr 2005
    Location
    california
    Posts
    6
    Member #
    9559
    First fix your doctype!

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    The doctype in your document above is incomplete, a complete doctype looks like this
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    Learm more about doctypes here

    Without correcteing the above most of the suggestions above may/maynot work

  11. #10
    Senior Member misterphotoshop's Avatar
    Join Date
    Jul 2004
    Posts
    289
    Member #
    6538
    http://misterphotoshop.bravehost.com/index.html there is a link of what it looks like. Sorry about all of the adds.


Page 1 of 2 1 2 LastLast

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 07:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com