html help..

  • Menace 17 Mar 2005 15:32:10 5,887 posts
    Seen 2 years ago
    Registered 18 years ago
    I'm thinking of re-designing my homepage, and my skills are pretty limited, I don't know flash etc, and I don't use any fancy programs to write it either.. I'm kinda old-skool and like writing it all myself even if it takes forever.. so with that in respect I need some help..

    I want a centered page, say 800 px wide.. but I want to position gfx etc absolute.. - or relative to the centered page - NOT the left edge of the browser..

    Is this possible with html?




    I currently use these tags for absolute positions:

    (STYLE TYPE="text/css")
    (!--
    .a { position: absolute; left:0px; top:0px;}

    (/STYLE)


    Any help is appreciated, thx! =)

    Edited by Menace at 15:32:30 17-03-2005
  • Shivoa 17 Mar 2005 15:48:53 6,314 posts
    Seen 2 years ago
    Registered 20 years ago
    dump yourself a nice div in the middle of the page (800px wide) and then position a floating div with left:0px top:0px inside that div.

    Of course, if you don't want to have text over that graphic you could just use a normal relative div inside the main div with the same attributes and it'll stick to the top left corner of your mian 800px wide div.

    margin:0 auto is your friend when it comes to centeredxd divs for the main one IMHO, although I'm sure there are other ways of doing it without resorting to depreciated tags.
  • Menace 17 Mar 2005 20:34:27 5,887 posts
    Seen 2 years ago
    Registered 18 years ago
    Thx for the reply.. but I'm afraid you lost me in the first sentence.. :/

    I hope its not too much to ask if you'd care to make a little example for me.. I'd really be grateful! =)

    Edit: removed page from my server...

    Edited by Menace at 09:31:20 18-03-2005
  • MetalDog 18 Mar 2005 05:04:55 24,076 posts
    Seen 3 years ago
    Registered 20 years ago
    When I want to position stuff exactly, I use tables. Go to www.webmonkey.com they have simple examples of just about everything.
  • Menace 18 Mar 2005 08:19:23 5,887 posts
    Seen 2 years ago
    Registered 18 years ago
    The reason I started to use styles at all was that I felt I coulnd't control tables properly.. But thx for the advice! =)
  • Captain-Fetid 18 Mar 2005 08:30:47 659 posts
    Registered 17 years ago
    But... but.. tables are evil!
  • Shivoa 18 Mar 2005 11:27:25 6,314 posts
    Seen 2 years ago
    Registered 20 years ago
    CSS is definitely a more modern way of ordering pages and having started out preaching tables (started writing webpages in '97) and sticking with them up to last year it took a course on webdesign to teach me the error of my ways. Now I use CSS div elements for the entire layout of the page with a few tables where required to do table things. It also helps that a lot of what made tabels great for doing layout in now depreciated in the html4 standard and so something you're advised to avoid.

    [code].prefs {position:relative;margin:0 auto;width:800px;text-align:left;}

    .logo {position:relative;left:0px;top:0px;}

    {div class="prefs"}{div class="logo"}image{/div}content{/div}[/code]

    Edit: ok, so tags are deleted even when in code tags. damn.

    Edited by Shivoa at 11:29:28 18-03-2005
  • Menace 21 Mar 2005 10:05:35 5,887 posts
    Seen 2 years ago
    Registered 18 years ago
    Thx for the help Shivoa!

    I must shamefully admit that I haven't had time to try your suggestions/example yet.. also because I found another solution that works ok but not perfectly.. (http://www.dennysden.com/ddv2/index.html) - still work in progress, almost no content but the frame is there.. have a look if you're really bored! =)
  • Menace 21 Mar 2005 11:13:46 5,887 posts
    Seen 2 years ago
    Registered 18 years ago
    Thx, I also look to those pages for help when I'm up against it.. still I'm thick so sometimes I need specific examples and just can't find what I need.. so I turn to my fave source of knowledge; EG forumnites =)

    I use UltraEdit.. but I find that both UltraEdit and Notepad somehow bolloxes up with regards to spaces.. I mean.. I have to put tags right next to eachother or the browsers add a small space where I don't want it.. which makes the code harder to read.. (for me anyways)..

    Anybody have a solution for this?
  • Shivoa 21 Mar 2005 11:44:24 6,314 posts
    Seen 2 years ago
    Registered 20 years ago
    Fruit_Salad wrote:
    Me too, program of choice > Windows Notepad.
    You make me sick :)
    Anyone who chooses to write html without any colour is just wrong. I write everything by hand but at least I use textpad to colourise it so I can actually see what I'm doing.
Sign in or register to reply

Sometimes posts may contain links to online retail stores. If you click on one and make a purchase we may receive a small commission. For more information, go here.