Results 1 to 4 of 4

Thread: Dynamically centered content

  1. #1
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamically centered content

    ok, so i've designed my site in Dreamweaver MX when i realise that you can dynamically center the content...however, my original design didn't take that into account. I'm not much an HTML/CSS expert so any help is greatly recieved. I've tried to put a <div> tag around the other <div> tags so that they keep thier absolute locations. e.g.

    "<div id="master"
    <div id="Layer2" style="position:absolute; left:4px; top:4px; width:2px; height:13px; z-index:2"><img src="navbar/gsqure.gif" width="22" height="22">
    </div>"

    Where master is linked to an external CSS file where the box is dynamically centered. Is there any way to fix my problem without redesigning the whole site?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    "Dynamically center" the content? I think your definition of "dynamically" differs slightly from mine/ours. Please clarify.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ah! Sorry if I've been using the wrong term...by dynamic I mean that the page content is centered in the brower window regardless of the window size. e.g. http://news.bbc.co.uk/2/hi//default.stm is not centered whereas http://www.lufthansa.com is centered.

    A bit clearer now?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Aha, yes. Well, images are inline elements, so simply surrounding the code with:
    Code:
    <div style="text-align:center;"><p>Text blah blah blah<img src="image">more text isn't this fascinating</p></div>
    Last edited by Twey; 04-24-2006 at 07:29 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •