Results 1 to 8 of 8

Thread: Border / Table

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

    Default Border / Table

    Hey, I know this is a really stupid question but my html/css skills are so rusty that you might say they're invisible. How can I put the whole page I did, really simple one, in a table .. ? Or to put it another way ... how can I put a border around the whole page ?

  2. #2
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    Code:
    table {
    	border: thin;
    	border-color: Blue;
    }
    This code well make all tables have a thin blue border. You can change the word table to make other things have a Blue Border.

    Say you have
    Code:
    <div id="wrapper">Content Here</div>
    And you want it to place a blue border around your content take the same CSS i placed above and change it to this:
    Code:
    #wrapper {
    	border: thin;
    	border-color: Blue;
    }
    And that will place a blue border around all your conent that is inside the DIV tags.

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

    Default

    May I suggest, however, that you use a DIV with the above CSS applied, rather than a table. Tables slow down page loading time.
    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!

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by T-B0N3
    Or to put it another way ... how can I put a border around the whole page ?
    First, wrap the content in a container (a div element will do) and give it an id attribute value like 'container' or 'wrapper'. It's then a matter of styling it as you see fit.

    For example,

    Code:
    #wrapper {
      background: #ffffff;
      color: #000000;
      margin: 1em;
      border: 2px solid #000000;
      padding: 0.5em;
    }
    HTML Code:
    <div id="wrapper">
      <!-- ... -->
    </div>
    will create a region with a white background and a moderately thick, solid black border. The margin will keep the border away from the edge of the viewport (assuming the wrapper is a child of the body element), and the padding will keep the contents away from the border.

    Hope that helps,
    Mike

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

    Default

    Thanks a lot guys ... that was what I was looking for.

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

    Default

    Me again ... I'm not opening a new thread as the matter is not worth it.

    There goes. I have index.html which let's say points to a.html - a.html has it's own sublinks b c and d.html. I want that once you click a.html link on the index, the a window to be automaticly resized to ... 400 by 400 let's say. After the user has chosen wether to go to b c or d, and he clicks the aferent link I want the window size to go back to normal, as b c and d are normal webpages. Therefore I only want a.html to be of a certain size, the rest... normal. Oh and ... I want to keep it in the same window no target=blank. Possible ?
    Thanks ahead.

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

    Default

    You can try window.resizeTo(400, 400), but a lot of browsers will block it as a security measure.
    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!

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

    Default

    Ok ... I shall try and see what comes out of it. Cheers.

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
  •