{"id":58,"date":"2005-02-24T19:10:00","date_gmt":"2005-02-24T13:40:00","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/2005\/02\/24\/css-quick-tip-put-it-in-a-box\/"},"modified":"2020-04-24T15:02:52","modified_gmt":"2020-04-24T09:32:52","slug":"css-quick-tip-put-it-in-a-box","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2005\/02\/css-quick-tip-put-it-in-a-box\/","title":{"rendered":"CSS Quick Tip: Put it in a Box"},"content":{"rendered":"<p>This Cascading Style Sheets (CSS) tutorial allows new web designers to publish their site and quickly <strong>put anything is a box<\/strong>. It is meant for beginners of html and css web designing their first web pages who are still figuring out the complexities of tables, and css div tags.<\/p>\n<p>We have the SPAN tag to your rescue. Just put whatever text, images etc. it inbetween these tags, and it puts your stuff inside a css box. No need for complex table web design arrangements or linked cascading style sheets or div and class tags.<\/p>\n<blockquote><p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px solid gray; padding: 10px;\">Put anything inside a box<\/span><\/p>\n<p>This is the simple code for the box above. Just put the css span tag above and the closing span tag below you matter and you have a box.<\/p>\n<div style=\"text-align: left;\"><span style=\"font-style: italic;\">&lt; SP AN style=&#8221;border:1px solid gray;padding:10px;background:yellow;&#8221;&gt;<\/span><br \/>\nPut anything inside these tags<br \/>\n<span style=\"font-style: italic;\">&lt; \/SPAN&gt;<\/span><\/div>\n<\/blockquote>\n<p>You can change the parameters to your liking &#8211;<\/p>\n<p><span style=\"font-weight: bold;\">border:1px solid gray<br \/>\n<\/span><br \/>\nThe <span style=\"font-weight: bold;\">border width<\/span> is 1 pixels. Increase the value to thicken the border, decrease to make it thin.<\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 3px solid gray; padding: 10px;\">Make border 3px<\/span><\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 7px solid gray; padding: 10px;\">Make border 7px<\/span><\/p>\n<p>The <span style=\"font-weight: bold;\">border style<\/span> is solid line. You can also make it dotted, dashed and many more.<\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px dotted gray; padding: 10px;\">Make border dotted<\/span><\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px dashed gray; padding: 10px;\">Make border dashed<\/span><\/p>\n<p>The <span style=\"font-weight: bold;\">border colour<\/span> is gray. You can change it to red, blue and such a list of limited colours given below.<\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px solid red; padding: 10px;\">Make border red<\/span><\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px solid blue; padding: 10px;\">Make border blue<\/span><\/p>\n<p><span style=\"font-weight: bold;\">padding:10px;<\/span><br \/>\nPadding signifies the space between the text and the border in pixels. If you keep the value low, the border will stick to the text.<\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px solid gray; padding: 1px;\">Make padding 1px<\/span><\/p>\n<p><span style=\"background: none repeat scroll 0% 50% yellow; border: 1px solid gray; padding: 20px;\">Make padding 20px<\/span><\/p>\n<p><span style=\"font-weight: bold;\">background:yellow<\/span><br \/>\nBackground color refers to the background of this box. You can change it to any color you want.<\/p>\n<p><span style=\"background: none repeat scroll 0% 50% red; border: 1px solid gray; padding: 10px;\">Make background red<\/span><\/p>\n<p><span style=\"background: none repeat scroll 0% 50% green; border: 1px solid gray; padding: 10px;\">Make background green<\/span><\/p>\n<p>Remember: Only 16 color names are supported by naming them &#8211; aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. If you want more customized colors, then there is a choice of hundreds of three or six unit codes e.g. #ccc will give you a light gray and so on.<\/p>\n<p>There are several hundred&#8217;s of tags to get your boxes looking smarter and most customized, but that is not the aim of this article. This is a very simple way to get you started on your first box. I hope you find these tips handy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This Cascading Style Sheets (CSS) tutorial allows new web designers to publish their site and quickly put anything is a&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6,1],"tags":[49],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-blogging","category-tips","tag-tutorials"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":0,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}