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 6 of 6

Thread: CSS Help

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Member #
    36175
    On the home screen of my website is the content is where I want it to be. However on the about page when you click the "About Me" link the cotent on the page is pushed left. What is causing this? Any help would be much appreciated, I attached the CSS and HTML files for both pages.

    About Page- http://www.corycox.com/About.html
    Home Screen- www.corycox.com
    Attached Images Attached Images

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    I, uh...wow. You have some pretty interesting stuff going on there.

    Anyway, if you want your floated image to show at the top of the text like on the main page, you have to put it first in the HTML. On the About page, you have it after the text.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Junior Member
    Join Date
    May 2013
    Posts
    11
    Member #
    36185
    Home.html
    About.html

    good practice makes perfect. case sensitivity is also very important. I mean for me i've always named my pages in lower case e.g home.html but instead of that I just use the index.html and about.html and so on

    Anyway I have just downloaded your "About.html" page to take a look at the code and not a single div tag was found in your code. To be honest the whole file and code is a mess to read. opening and closing tags are all AWOL. some simple advice: Try laying out your design using div tags, blocks, ap divs may be tables....... whatever you can get a hang of. div tags are very essential and important in laying out content especially when you want to centre or display 100% they give you so many options. Do some research on div tags and other elements of html coding. Don't want to go on forever but ya use elements, divs......

    Anyway......

    managed to find the opening and closing tags. so if you want to centre your content, whatever you wish to achieve. try wrapping the content in a wrapper div.

    try this css code - it will centre (middle of the screen) the content.

    take out the height and width from the "body { }" in css

    wrap the content from top to bottom in a wrapper div after the openning <body> tag - for example:

    Code:
    <bod>
    <div id="wrapper">
     
    All your content in here.
     
    </div>
    after head over to About Style.css and add this to it:

    #wrapper {
    margin: 0px auto 0px auto;
    width: 700px;
    }

    I only put the 700px width spontaneously to enable the content to centre. This will move your content from the left side of the screen to the the middle of the screen.

    Do some research on html elements div tags and so on. also naming html files eg. pages (no spaces) NO: About Me.html YES: aboutme.html or about-me.html or about_me.html.

    hope this solves your issue!

  5. #4
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Member #
    36175
    Hey thanks for the help guys! I am pretty new to this stuff really. One more question, you can use "ids and classes" inside of a <p> tag or any tag like <p id="wrapper">?

  6. #5
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Yes, you can do that
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  7. #6
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Member #
    36296
    margin: 0px auto 0px auto;

    [Edit: Link drop removed. Please read the rules. AlphaMAre.]


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