change size of a post in wordpress

Discussion in 'HTML & Website Design' started by ajay001, Dec 20, 2009.

  1. #1
    how can i set the width of a particular post in wordpress site. i.e, i want to post a single post in a particular page and that post must occupy the whole page (body section) for that i already removed the sidebar for that page but i can't set the width of that post.........
     
    ajay001, Dec 20, 2009 IP
  2. ajay001

    ajay001 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2

    for example http://indimovi.net/temp-2/ here though i gave iframe dimensions its not exceeding the actual post width...
    plz suggest a solution.....
     
    ajay001, Dec 20, 2009 IP
  3. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #3
    Change the width of
    
    div#main{
    	width: 660px;
    	float: left;
    	display: inline;/* fix double margin */
    	margin: 30px 25px 30px 10px;
    	}
    
    Code (markup):
    and delete "float: left" (if you don't use sidebar) in the style.css of the theme.
     
    s_ruben, Dec 20, 2009 IP
  4. ajay001

    ajay001 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    by doing this the sidebar will not come in all pages
    but i want the side bar in remaining pages except that particular page......
     
    ajay001, Dec 20, 2009 IP
  5. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #5
    Try this:

    Change the
    
    <div id="main">
    
    Code (markup):
    to
    
    <div id="main" <?php if(get_the_ID()==THE_POST_ID){ echo('style="width: 100%"'); } ?>>
    
    Code (markup):
    in the single.php of the theme. And change THE_POST_ID to the post id for which you want to do this all. :)
     
    s_ruben, Dec 20, 2009 IP
  6. ajay001

    ajay001 Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    still no use....
    is there any way to edit the html of that page
     
    ajay001, Dec 21, 2009 IP
  7. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #7
    Login to admin panel, then go to the "Appearance"->"Editor" and chose the file single.php on the right panel and edit it.
     
    s_ruben, Dec 21, 2009 IP