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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Aligning a DIV inside a CLASS

    Hi

    I'm having trouble aligned my div named #touch inside my class named div.page-name.

    I want it to align to the right but I can't understand why it won't. I've tried float;right; as well but it only moves it to the right slightly.

    This is my HTML:

    Code:
    <div class="page-name">
            <div id="touch">Get in touch!</div>
    
    		<h3 class="fontface">My Portfolio</h3>
    
    </div>
    And my CSS:

    Code:
    div.page-name {
        position:relative;
        width:1000px;
        height:100%;
    	background-color:#CFC;
    	margin-left:auto;
    	margin-right:auto;
    }
    	
    #touch {
    	position:relative;
    	text-align:right;
    }
    http://benlambe.com/Website/portfolio.html

    If anyone can help it would be appreciated.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Your XHTML code is not well formatted. You have not closed several tags properly. For instance you missed XML end tag slash for empty elements:
    Code:
    <link rel="stylesheet" href="css.css" type="text/css" />
    <link rel="stylesheet" href="fontface.css" type="text/css" charset="utf-8" />
    And you have an extra </div> on line 34, i think, which closes nothing. You have several elements with the same id (an id must be unique)...And many other similar errors.

    Validate, first, your document at:
    http://validator.w3.org/
    Last edited by Kor; 09-08-2011 at 02:16 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    bummer dude:

    This Page Cannot Be Displayed

    Based on your corporate access policies, this web site ( http://benlambe.com/Website/portfolio.html ) has been blocked because it has been determined by Web Reputation Filters to be a security threat to your computer or the corporate network. This web site has been associated with malware/spyware.

    Threat Type: Othermalware
    Threat Reason: Hosted on IP controlled by a group or individual known to be malicious.

    If you have questions, please contact your corporate network administrator and provide the codes shown below.

    Notification codes: (1, MALWARE, Othermalware, Hosted on IP controlled by a group or individual known to be malicious., BLOCK-MALWARE, 0x0e9e34e8, 1315490934.055, QAAAAQAAAAAAAAAAFP8ACP8AAAD/AAAAAAAAAAAAAAE=, http://benlambe.com/Website/portfolio.html)

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by DanInMa View Post
    bummer dude:

    This Page Cannot Be Displayed

    Based on your corporate access policies, this web site ( http://benlambe.com/Website/portfolio.html ) has been blocked because it has been determined by Web Reputation Filters to be a security threat to your computer or the corporate network. This web site has been associated with malware/spyware.

    Threat Type: Othermalware
    Threat Reason: Hosted on IP controlled by a group or individual known to be malicious.

    If you have questions, please contact your corporate network administrator and provide the codes shown below.

    Notification codes: (1, MALWARE, Othermalware, Hosted on IP controlled by a group or individual known to be malicious., BLOCK-MALWARE, 0x0e9e34e8, 1315490934.055, QAAAAQAAAAAAAAAAFP8ACP8AAAD/AAAAAAAAAAAAAAE=, http://benlambe.com/Website/portfolio.html)
    Really? Which browser do you use? I see neither of all these in my browsers: IE6, IE7, IE8, IE9, FF 6, Opera 11, Chrome 13.

    Nor my MSE protection does not complain at all, (it is true that MSE is not quite restrictive...)
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bummer dude:
    I've never seen that, but I'm using a free host at the moment. I'll look into getting a paid package from a reliable company.

    Your XHTML code is not well formatted. You have not closed several tags properly. For instance you missed XML end tag slash for empty elements:
    Code:
    <link rel="stylesheet" href="css.css" type="text/css" />
    <link rel="stylesheet" href="fontface.css" type="text/css" charset="utf-8" />
    And you have an extra </div> on line 34, i think, which closes nothing. You have several elements with the same id (an id must be unique)...And many other similar errors.

    Validate, first, your document at:
    http://validator.w3.org/
    I've fixed that, and I've validated both my xhtml and css.


  •  

    Posting Permissions

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