I have a problem help me

Discussion in 'HTML & Website Design' started by cognac, Mar 18, 2008.

  1. #1
    I have a forum SMF and i've put my add there and its dont look good.

    I need my add to show in center no in the left side..

    No like this
    [​IMG]
    Like this
    [​IMG]
     
    cognac, Mar 18, 2008 IP
  2. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #2
    
    <center>Ad code goes here</center>
    
    Code (markup):
    or
    
    <p align="center">Ad code goes here</p>
    
    Code (markup):
    or
    
    <table align="center"><tr><td>Ad code goes here</td></tr></table>
    
    Code (markup):
     
    dylanj, Mar 18, 2008 IP
  3. Flash Junky

    Flash Junky Well-Known Member

    Messages:
    319
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    130
    #3
    You could even center the whole page:

    <html>
    <center>

    Content...

    </center>
    </html>
     
    Flash Junky, Mar 18, 2008 IP
  4. FBTools

    FBTools Peon

    Messages:
    31
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I wouldn't use tables as they're bad for SEO.
     
    FBTools, Mar 18, 2008 IP
  5. kangaroobin

    kangaroobin Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    then use the first two...
     
    kangaroobin, Mar 18, 2008 IP
  6. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #6
    That is exactly why I put it last...
     
    dylanj, Mar 19, 2008 IP
  7. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    All three of those methods are bad. You shouldn't be using the "align" attribute - it's depreciated.

    What you should be doing is:
    <div style="margin:0 auto;  text-align:center;"> ... </div>
    HTML:
    Cheers
    Marc
     
    Marc Fraser, Mar 19, 2008 IP
  8. kangaroobin

    kangaroobin Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    right...a ton more work for the same thing..ok. How is that depreciated when you are using the text-align attribute?
     
    kangaroobin, Mar 19, 2008 IP
  9. Marc Fraser

    Marc Fraser Peon

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Because that isnt the "align" attribute. As you can see the "text-align" is used within the "style" attribute of that div, which makes it CSS code. Whereas the "align" attribute is used directly in a div like: "align="center""....

    Do you get me? (basically text-align is CSS, not HTML)
     
    Marc Fraser, Mar 19, 2008 IP
  10. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #10
    The center tag in HTML is depreciated as well. While it might be more work to do it inline. If you assign it to a class and call it over and over again, it will reduce the amount of 'work'.
     
    shallowink, Mar 19, 2008 IP
  11. kangaroobin

    kangaroobin Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    agreed....
     
    kangaroobin, Mar 19, 2008 IP