+ Reply to Thread
Results 1 to 2 of 2

Thread: [Wordpress] Adding a Border Around the Main Area

  1. #1
    jmixmaster29's Avatar
    jmixmaster29 is offline x10Hosting Member jmixmaster29 is an unknown quantity at this point
    Join Date
    Feb 2011
    Posts
    29

    [Wordpress] Adding a Border Around the Main Area

    I am trying to add a CSS border around my site (which is using Wordpress) to create a break-way between the main website block and the background color. I am still quite new to HTML/CSS but I do know how to read it and what most of it does. I wrote this style for the border:

    Code:
    #border{
    	border: 1px solid #000;
    	position: absolute;
    }
    I then created a div and wrapped it around "<?php get_header(); ?>" and "<?php get_footer(); ?>" because I want to use the same border to surround the header and footer and everything in between. If you go here: http://gotdocs.co.cc/2011/02/26/hello-world/ you will see what happened. Any idea of what could be wrong?

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: [Wordpress] Adding a Border Around the Main Area

    #border has a border, there's just no space outside of it; the border is against the window. If you give #border a margin, you'll see the border.

    Header templates generally include antecedents, such as the DOCTYPE declaration, <head> elements and <html> open tag. By placing your #border div before get_header, you're creating an invalid HTML file. Browsers are free to interpret this how they will, including placing all the elements that should go in <head> in the <body> instead, or ignore the elements entirely. A simpler solution would be to place your open and close tags in the header and footer templates (header.php and footer.php, respectively), if no suitable element already exists there. You could also target <body> with your styling.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. cant access wordpress admin area
    By xtremepromoter24 in forum Free Hosting
    Replies: 2
    Last Post: 10-23-2010, 02:19 PM
  2. Adding another sidebar on wordpress
    By josh72 in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 08-15-2010, 12:54 AM
  3. Can't change main domain in members area.
    By xdevhald in forum Free Hosting
    Replies: 3
    Last Post: 04-11-2010, 03:20 PM
  4. Can`t login to my Wordpress Blog admin area
    By LuciFerAngel in forum Free Hosting
    Replies: 2
    Last Post: 11-24-2008, 06:31 AM
  5. Adding Ads in Wordpress
    By sh8y in forum Free Hosting
    Replies: 4
    Last Post: 06-15-2005, 02:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers