Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


411 posts

Ultimate Geek


Topic # 29885 22-Jan-2009 13:06
Send private message

I have this bit of code:

    <td class="row-left" valign="top"><img src="{T_THEME_PATH}/images/row_left_top.gif" width="4" height="100" alt="" /></td>
    <td align="center" valign="top" id="header">
        <div id="logorow">
            <div id="logo-left"><div id="logo-right">
                <div align="centre"><a href="{U_INDEX}">{SITE_LOGO_IMG}</a>
              </div>
            </div></div>
        </div>

the line in bold is the one that I am trying to change.

I want the image to sit in the middle of the page, but it wont. It sits in the top left no matter what is put there, left, centre or right.

How can I change it so that I can put it in the centre, floating.




-- Divett Enterprises -- The Power Of Tomorrow --

Create new topic
I iz your trusted friend
5801 posts

Uber Geek
+1 received by user: 139

Mod Emeritus
Trusted
Lifetime subscriber

  Reply # 191287 22-Jan-2009 13:12
Send private message

The easiest way is:

<div align="centre"><a rel='nofollow' href="{U_INDEX}">{SITE_LOGO_IMG}</a></div>


<div style="text-align:center;" ><a rel='nofollow' href="{U_INDEX}">{SITE_LOGO_IMG}</a></div>




Internet is my backyard...

 

«Geekzone blog: Tech 'n Chips Takeaway» «Personal blog: And then...»

 

Please read the Geekzone's FUG

 


8027 posts

Uber Geek
+1 received by user: 387

Trusted
Subscriber

  Reply # 191299 22-Jan-2009 13:47
Send private message

Post a screenshot of how you want it to look and I'll create a sample for you of how it's done properly with xhtml and css.

BDFL - Memuneh
61163 posts

Uber Geek
+1 received by user: 11942

Administrator
Trusted
Geekzone
Lifetime subscriber

  Reply # 191313 22-Jan-2009 15:03
Send private message

If the image is bigger than the TD hosting it then it won't center in some browsers. Could this be the problem?






411 posts

Ultimate Geek


  Reply # 191324 22-Jan-2009 15:54
Send private message

Cheifie's solution worked perfectly :D

Thanks heaps guys!




-- Divett Enterprises -- The Power Of Tomorrow --

115 posts

Master Geek


  Reply # 191353 22-Jan-2009 17:34
Send private message

It could have just been the spelling of centre. Would the original code have worked with "center" replacing "centre"?

2483 posts

Uber Geek
+1 received by user: 4

Trusted

  Reply # 191368 22-Jan-2009 19:40
Send private message

This is usually a problem in standard compliant browsers - as stuff like align="abc" are deprecated in favour of the use of CSS styles (style="abc").




Find me on Twitter!

I posted 1, 2 x 10^3 times!

I iz your trusted friend
5801 posts

Uber Geek
+1 received by user: 139

Mod Emeritus
Trusted
Lifetime subscriber

  Reply # 191375 22-Jan-2009 20:55
Send private message

Well technically, the div align is telling div itself to be centered and not its child. AND think American spelling.




Internet is my backyard...

 

«Geekzone blog: Tech 'n Chips Takeaway» «Personal blog: And then...»

 

Please read the Geekzone's FUG

 


Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.