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
  1. #1
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Hello.
    I use html language and I have problem with the align function.
    I am not able to align objects or text to left, center or right. The align function isnít working at all, inside the table or outside the table.

    Here is the html code for the page:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <TITLE>Welcome to World CARP Tartu!</TITLE>
    <SCRIPT language=JavaScript>
    <!-- Hide the script from old browsers --

    img0_on = new Image(172,32);
    img0_on.src="images/button_after.jpg";
    img0_off = new Image(172,32);
    img0_off.src="images/button_before.jpg";

    img1_on = new Image(172,32);
    img1_on.src="images/button_after.jpg";
    img1_off = new Image(172,32);
    img1_off.src="images/button_before.jpg";

    img2_on = new Image(172,32);
    img2_on.src="images/button_after.jpg";
    img2_off = new Image(172,32);
    img2_off.src="images/button_before.jpg";

    img3_on = new Image(172,32);
    img3_on.src="images/button_after.jpg";
    img3_off = new Image(172,32);
    img3_off.src="images/button_before.jpg";

    img4_on = new Image(172,32);
    img4_on.src="images/button_after.jpg";
    img4_off = new Image(172,32);
    img4_off.src="images/button_before.jpg";

    img5_on = new Image(172,32);
    img5_on.src="images/button_after.jpg";
    img5_off = new Image(172,32);
    img5_off.src="images/button_before.jpg";


    function over_image(parm_name)
    {
    document[parm_name].src = eval(parm_name + "_on.src");
    }
    function off_image(parm_name)
    {
    document[parm_name].src = eval(parm_name + "_off.src");
    }
    // --End Hiding Here -->
    </SCRIPT>

    <link rel="stylesheet" type="text/css" href="main.css">
    <meta name="Microsoft Border" content="t">
    </HEAD>
    <BODY bottomMargin=0 vLink=#71415e aLink=#71415e link=#71415e bgColor=#ffffff
    leftMargin=0 background=images/background.jpg topMargin=0 rightMargin=0
    marginwidth="0" marginheight="0">
    <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%"
    background=images/top_background.jpg border=0>
    <TBODY>
    <TR>
    <TD vAlign=top background=images/background.jpg>
    &nbsp;
    <div align="center">
    <center>
    <TABLE cellSpacing=5 cellPadding=5 width="90%" background="" border=0>
    <TBODY>
    <TR>
    <TD>
    <H1>Title...</H1>
    <P>Comments...</P>
    <UL>
    <LI>Bulleted content...
    <LI>Bulleted content...
    <LI>Bulleted content...
    <LI>Bulleted content...</UL>
    <P class=smallcenter>Copyright ©2005 World CARP Tartu</P></TD></TR></TBODY></TABLE></center>
    </div>
    <p>&nbsp;
    </TD>
    <TD vAlign=top width=172 background=images/button_back.jpg
    height="100%">
    <P class=centerbold><BR><a onmouseover="over_image('img0');" onmouseout="off_image('img0')" href="index.html"><IMG
    src="images/button_before.jpg" border=0 name=img0 width="172" height="33"></a><BR><a onmouseover="over_image('img1');" onmouseout="off_image('img1')" href="index.html"><IMG
    src="images/button_before.jpg" border=0 name=img1 width="172" height="33"></a><BR><a onmouseover="over_image('img2');" onmouseout="off_image('img2')" href="index.html"><IMG
    src="images/button_before.jpg" border=0 name=img2 width="172" height="33"></a><BR><a onmouseover="over_image('img3');" onmouseout="off_image('img3')" href="index.html"><IMG
    src="images/button_before.jpg" border=0 name=img3 width="172" height="33"></a><BR><a onmouseover="over_image('img4');" onmouseout="off_image('img4')" href="index.html"><IMG
    src="images/button_before.jpg" border=0 name=img4 width="172" height="33"></a><BR><a onmouseover="over_image('img5');" onmouseout="off_image('img5')" href="index.html"><IMG
    src="images/button_before.jpg" border=0
    name=img5 width="172" height="33"></a></P></TD></TR></TBODY></TABLE>
    <table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/bottom_background.gif" height="5">
    <tr>
    <td width="100%"><font size="1">&nbsp;</font></td>
    </tr>
    </table>
    &nbsp;</BODY></HTML>


    I use a css for the page and the code is here:

    BODY {
    BACKGROUND-COLOR: #ffffff
    }
    P {
    FONT-SIZE: 13px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: justify; TEXT-DECORATION: none
    }
    P.center {
    FONT-SIZE: 13px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: center; TEXT-DECORATION: none
    }
    P.centerbold {
    FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: center; TEXT-DECORATION: none
    }
    P.centerwhitebold {
    FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #ffffff; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: center; TEXT-DECORATION: none
    }
    P.small {
    FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: left; TEXT-DECORATION: none
    }
    P.smallcenter {
    FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: center; TEXT-DECORATION: none
    }
    UL {
    FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: justify; TEXT-DECORATION: none
    }
    LI {
    FONT-SIZE: 13px; COLOR: #000000; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: justify; TEXT-DECORATION: none
    }
    H1 {
    FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: #63432f; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: left; TEXT-DECORATION: none
    }
    H2 {
    FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #00225d; FONT-FAMILY: verdana, sans-serif; TEXT-ALIGN: left; TEXT-DECORATION: none
    }
    A:link {
    COLOR: #63432f; FONT-FAMILY: verdana, sans-serif; TEXT-DECORATION: none
    }
    A:visited {
    COLOR: #63432f; FONT-FAMILY: verdana, sans-serif; TEXT-DECORATION: none
    }
    A:hover {
    COLOR: #00225d; FONT-FAMILY: verdana, sans-serif; TEXT-DECORATION: none
    }
    A:active {
    COLOR: #00225d; FONT-FAMILY: verdana, sans-serif; TEXT-DECORATION: none
    }


    Thank you a lot.
    The beat never fades!

  2.  

  3. #2
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    What is it specifically that is not working the way you expect?

    I copied your text into html and css files to see what the page looks like, but I don't know what you expect it to look like, so I can't tell you what's not working and why.

  4. #3
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Without having looked at the code thoroughly, mixing CSS and HTML for presentation is going to get you into a lot of very confused trouble. I'd advise you either use the vertical-align/align CSS properties, OR use the HTML align/valign properties. I'd recommend the CSS ones, but either one should work. If you mix the two, you never know when you might make one interfere with the other, and I'm not sure which takes precedence in a browser...

  5. #4
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    My problem is that I can't use align= function. It means that I can't align neither objects like images neither text content to the side I want. For example if I want text aligned to left it doesn't work. And if I want an image aligned to right it doesnít work too. Some peace of HTML code prevents me from being able to use align= function properly. It looks like the content and objects stay frozen wherever HTML code wants them to stay. What I want is to find that particular peace of HTML code that stops me from being able to align objects.
    The beat never fades!

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    I realize that's your problem; my point is, it'll probably be easier to pinpoint where the problem is if you just switch to using CSS for all your aligning or HTML for all your aligning. Then you only have to deal with information in one place as opposed to split over several places. It's up to you; I'll see if I can look at the code itself in more depth a little later.

  7. #6
    Member az0000000's Avatar
    Join Date
    Feb 2005
    Location
    Moldova, Chisinau
    Posts
    57
    Member #
    9033
    Thanks a lot everyone, i could find the reason. All i did is remove the TEXT-ALIGN: variable from css file my website uses. Now i can align objects the way i want.
    Cheers everyone!
    The beat never fades!


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