{"id":1101,"date":"2014-10-22T17:46:07","date_gmt":"2014-10-22T17:46:07","guid":{"rendered":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/?p=1101"},"modified":"2017-03-10T16:16:19","modified_gmt":"2017-03-10T16:16:19","slug":"css-code-to-solve-div-alignment-problems","status":"publish","type":"post","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/css-code-to-solve-div-alignment-problems\/","title":{"rendered":"CSS Code to Solve Div Alignment Problems"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-content\/uploads\/2014\/10\/css_cascading_style_sheet.jpg?ssl=1\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1103\" src=\"https:\/\/i0.wp.com\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-content\/uploads\/2014\/10\/css_cascading_style_sheet.jpg?resize=222%2C140&#038;ssl=1\" alt=\"CSS Cascading Style Sheet\" width=\"222\" height=\"140\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>I was having problems aligning data inside a div container but I could not see what was causing this issue.<\/p>\n<p>I originally thought it was to do with padding, margins and then div alignments and then came up with this useful code to help fault find my divs.<\/p>\n<p>Paste the following code into the div tag in your HTML page:<\/p>\n<blockquote><p>style=&#8221;display:inline-block; border: 3px solid purple;<\/p><\/blockquote>\n<p>This will show a bright border for the DIV so you can more easily fault find any problems.<\/p>\n<p>Enjoy<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some code to solve CSS DIV alignment problems.<\/p>\n","protected":false},"author":1,"featured_media":2398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3],"tags":[709,710,618,711,190,712,713,714,715,117,716,717,193,718,649],"class_list":["post-1101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-related","tag-alignment","tag-border","tag-code","tag-container","tag-css","tag-div","tag-divs","tag-fault-find","tag-html","tag-issue","tag-margins","tag-padding","tag-style","tag-style-sheet","tag-tip"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-content\/uploads\/2014\/10\/css.jpg?fit=200%2C100&ssl=1","jetpack-related-posts":[{"id":620,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/css-blockquotes-for-quotations\/","url_meta":{"origin":1101,"position":0},"title":"CSS Blockquotes for Quotations","author":"Nerd","date":"24th December 2011","format":false,"excerpt":"How to add blockquotes to your CSS Style Sheet and use them on WordPress.","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":610,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/css-basic-custom-style-sheet\/","url_meta":{"origin":1101,"position":1},"title":"CSS Basic Custom Style Sheet","author":"Nerd","date":"24th December 2011","format":false,"excerpt":"The <Style> tags allows you to define style information for an HTML document. <Style> tags always go in the header of the HTML document. \u00a0 Example below: <html> <head> <style type=\"text\/css\"> h1 {color:red;} p {color:blue;} <\/style> <\/head> <body> <h1>Header 1<\/h1> <p>A paragraph.<\/p> <\/body> <\/html> Please feel free to copy and\u2026","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":166,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/microdirect-samsung-750gb-spinpoint-f1-sat-samsung-hd753lj\/","url_meta":{"origin":1101,"position":2},"title":"Microdirect &#8211; Samsung 750GB Spinpoint F1 SAT (Samsung HD753LJ)","author":"Nerd","date":"12th January 2010","format":false,"excerpt":"I purchased a hard drive from microdirect about a year ago. The hard disc drive is a \"Samsung 750GB Spinpoint F1 SAT,\u00a0 Samsung HD753LJ\" and has always seemed to have problems with sectors and the hard disc drive did not always appear in \"My Computer\". I ran Spinrite to repair\u2026","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2477,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/how-to-solve-the-apple-touch-icon-precomosed-w3c-validation-error-solved\/","url_meta":{"origin":1101,"position":3},"title":"How to solve the &#8220;apple-touch-icon-precomosed&#8221; W3C Validation Error [SOLVED]","author":"Nerd","date":"12th March 2017","format":false,"excerpt":"How to solve the \"apple-touch-icon-precomosed\" W3c Validation Error message.","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2488,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/bad-value-for-attribute-href-on-element-a-illegal-character-in-query-space-is-not-allowed-solved\/","url_meta":{"origin":1101,"position":4},"title":"Bad value for attribute \u201chref\u201d on element \u201ca\u201d: Illegal character in query: space is not allowed. [SOLVED]","author":"Nerd","date":"12th March 2017","format":false,"excerpt":"How to resolve the W3C Validation error \"Bad value for attribute \u201chref\u201d on element \u201ca\u201d: Illegal character in query: space is not allowed.\"","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2490,"url":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/w3c-eng-tag-br-validation-error-solved\/","url_meta":{"origin":1101,"position":5},"title":"End Tag &#8220;br&#8221; &#8211; W3C HTML Validation Error [SOLVED]","author":"Nerd","date":"13th March 2017","format":false,"excerpt":"How to resolve the \"End tag \"br\". W3C validation error message.","rel":"","context":"In &quot;Computer Related&quot;","block_context":{"text":"Computer Related","link":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/category\/computer-related\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/posts\/1101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/comments?post=1101"}],"version-history":[{"count":4,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/posts\/1101\/revisions"}],"predecessor-version":[{"id":1360,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/posts\/1101\/revisions\/1360"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/media\/2398"}],"wp:attachment":[{"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/media?parent=1101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/categories?post=1101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nerdorturd.com\/webdevelopments\/nerdorturd\/wp-json\/wp\/v2\/tags?post=1101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}