jfkballistics Posted October 17, 2011 Share Posted October 17, 2011 Good Morning, First off let me say I am really new to coding, and hope that I am posting this in the right place. What I am trying to do is add a field to my web pages. My index page looks like this: www.kennedyassassinationresearch.com I like this layout, and can work with it. On this front page, I will add a link to a page called articles. When my visitors go to this page, I would like them to see a white field in the middle, like the one on this page: www.jfkballistics.com/articles.html So basically I want to modify the index page to have a field that I can use on other pages. I am attaching a notepad file of my CSS Any help is much appreciated! css.txt Link to comment Share on other sites More sharing options...
T1000Android Posted October 17, 2011 Share Posted October 17, 2011 Use a div element with padding and border Put this in your HTML file:<div id="boxmodel">Put your text here.</div> And this in your CSS file:#boxmodel {width:300px; height:200px; padding:20px; border:10px solid red; margin:50px; background-color:white;} Link to comment Share on other sites More sharing options...
jfkballistics Posted October 17, 2011 Author Share Posted October 17, 2011 Android thank you! This seems to have me on the right track! Now is there any way to make this box wider, without disrupting the sidebox menus? I tried a couple different things, but it just moved the side box menus to the bottom of the page. Link to comment Share on other sites More sharing options...
T1000Android Posted October 18, 2011 Share Posted October 18, 2011 Yeah, just adjust the width and height. You can put the width in percent if you want: "width:60%;" and you can lose the height attribute altogether also.The best way is to save a copy of the CSS string and just fiddle with it and see what you get.Add the "float:left;" attribute to both but make sure to put the div element ahead of your menu in the code if your menu is on the right side, and after the menu in the code if your menu is on the left side. Also try with the "float:right;" method on the div element. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.