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.


AllNightNerding

411 posts

Ultimate Geek


#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
chiefie
I iz your trusted friend
5877 posts

Uber Geek
+1 received by user: 151

Retired Mod
Trusted
Lifetime subscriber

  #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

 




Ragnor
8287 posts

Uber Geek
+1 received by user: 591

Trusted

  #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.

freitasm
BDFL - Memuneh
80944 posts

Uber Geek
+1 received by user: 41698

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #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?




Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 




AllNightNerding

411 posts

Ultimate Geek


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

Cheifie's solution worked perfectly :D

Thanks heaps guys!




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

Tahii
115 posts

Master Geek


  #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"?

manhinli
2483 posts

Uber Geek
+1 received by user: 4

Trusted

  #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!

 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
chiefie
I iz your trusted friend
5877 posts

Uber Geek
+1 received by user: 151

Retired Mod
Trusted
Lifetime subscriber

  #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








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.