Really need some help.

Discussion in 'CSS' started by jWebXpress, Dec 18, 2007.

  1. #1
    I have a few problems and was hoping to get some help.

    This is the page in question.
    http://www.myspacebypixel.com/proxy/

    1. In Firefox, the welcome text is aligned to the left, when it should be aligned to the center as it is in IE6

    • In Firefox, the 468x60 ads are pretty centered and aligned to the right in IE6

    I cannot figure it out and hope someone here sees the problem. Thanks in advance

    Here's the entire code including the cee for the page:
    <style type="text/css">
    *{
    padding:0px;
    margin:0px;
    }
    body{
    margin:0px;
    }
    #head{
    background:url(images/Untitled-2_03.gif) no-repeat;
    width:544px;
    height:384px;
    margin:0px;
    padding:10px;
    text-align:center;
    }
    #content{
    width:544px;
    text-align:center;
    color:#FFFFFF;
    height:384;
    margin:0px;
    }
    #form{
    background:url(images/Untitled-2_06.gif) no-repeat;
    width:584px;
    height:114px;
    }
    #address{
    background-color:#000000;
    height:26px;
    width:368px;
    font-family:Arial;
    font-size:22px;
    color:#FFFFFF;
    border:0px;
    float:left;
    margin:30px 5px 5px 28px;
    }
    #enter{
    margin:28px 5px 5px -62px;
    }
    a {color: #ffffff; text-decoration: none}
    </style>
    	</head>
    
    <body>
    <center>
    <div id="content">
    <div id="head"><a href="index.php"><img src="logo.png" alt="Home" border="0" /></a></div>
    <center>
    <div style="margin:-300px 10px 10px 35px; float:left; width:400px;">
    <?php echo($desc); ?><br /><br />
    <center><? echo''.$adcode1.'<br />'.$adcode1.''; ?></center>
    </div>
    <center><div id="ad1" align="center"><?php echo($adcode2); ?></div></center>
    <form id="form" method="post" action="./">
    			<!-- Make sure you leave the two input fields the same! -->
    			<input type="hidden" name="__proxy_action" value="redirect_browse" />
    			<input type="text" name="__proxy_url" value="http://" id="address" />
    			<input id="enter" type="image" src="images/Untitled-2y_08.gif" value="" /><br />
    			</form>
    </center>
    </div>
    </center>
    Code (markup):
     
    jWebXpress, Dec 18, 2007 IP
  2. zoreli

    zoreli Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Hi

    You have your style on the top, but you also use inline style
    <div style="margin:-300px 10px 10px 35px; float:left; width:400px;">

    Add here text-align:center, and you will be fine.

    I dont understand which is your problem with adds.

    Regards, Zoreli
     
    zoreli, Dec 18, 2007 IP
  3. jWebXpress

    jWebXpress Well-Known Member

    Messages:
    646
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Is this the right way?
    <div style="margin:-300px 10px 10px 35px; float:left; text-align:center; width:400px;">

    If so, it didn't do anything to the text

    The ads, when shown in IE 6 appear to the right and not centered
     
    jWebXpress, Dec 18, 2007 IP
  4. zoreli

    zoreli Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Same thing here:

    #ad1
    {
    text-align:center;
    }

    should do the trick.

    Regards, Zoreli
     
    zoreli, Dec 18, 2007 IP
  5. zoreli

    zoreli Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    two things here.

    you are opening, but you are not closing your div

    <div style="margin:300px 10px 10px 35px; float:left; text-align:center; width:400px; background:#e6e6e6;">
    Welcome to <b>myspavebypixel.com/proxy</b>! Never let your teachers, boss, or principal control your web browsing again! To bypass web filters, all you have to is type the URL of the website you want to unblock and hit ENTER! Protect your anonymity and remain safe with this site. Why wait any longer? Start unblocking sites now! Remember to bookmark us and to tell your friends.<br /><br />
    </div>

    second, you have negative margin, so to be able to test it , I remove that negative margin.

    Copy and paste the above code, text is centered in IE6, IE7, FF and Opera.

    Same rule apply for your ads div, all you need is to add text-aalign:center property.

    Regards, Zoreli
     
    zoreli, Dec 18, 2007 IP
  6. jWebXpress

    jWebXpress Well-Known Member

    Messages:
    646
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    140
    #6

    when I paste this code, it sends the text way down the page
     
    jWebXpress, Dec 18, 2007 IP
  7. jWebXpress

    jWebXpress Well-Known Member

    Messages:
    646
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    140
    #7
    Thanks to those who have helped so far. A member on site point fixed it, so now it works.
     
    jWebXpress, Dec 18, 2007 IP