SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2000
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a newbie when it comes to CSS, and i'm struggling with using the positioning tools. I think i've finally got the absolute/relative thing sussed, but i cannot find any method of centering the objects on my page. i know about the 'align=center' command, but i want to centre the div objects themselves on my page, like you do with normal positioning and the 'center' tag. I cannot believe that with all the added functions that CSS brings, there is no way to centre things on a page. I've tried putting everything in a table and then centering that but that didn't seem to work, and anyway i thought the great thing about CSS is that you could scrap things like using tables for layout. I'm having to consider scrapping CSS altogther for my site, which is a real shame. So please help, if anyone knows of a solution, simple or otherwise, please reply. I won't even start with the problems i'm having displaying my page in Netscape... that's a whole separate problem.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    WA
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can try adding left and right margins to your div tag to center it.

    I did that on my personal site and it seems to work well.

    I used percentages. I imagine a fixed value would work as well. You can view my stylesheet here.

    I'm sure if you look you'll find some errors in the stylesheet, but I'm still learning.

    hth
    Bimjo

  3. #3
    twashington
    SitePoint Community Guest
    I dont think it works with all elements, but you can use the 'text-align' feature with some things.
    I know it works with TD and Hx

    H1{text-align:center;}

    I've never tried it on a div, good luck!


    ------------------
    That's just my opinion
    t.washington@visto.com

  4. #4
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using TopStyle http://www.bradsoft.com/topstyle/

    You can cretae a style sheet ( CSS1) without much knowledge. If yo don't know much about that thing, for example.... font-size
    then you view the help file and they explain everything. you can also view the support font-size has on various browsers.

    Interface is good. Its perfect for a newbie, even an advanced css user

    ------------------


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •