all! I thank you for your time and attention today : ). I currently use Dreamweaver and do some design work, however I have been unable to find an answer to this question. I'm happy to pursue any knowledge necessary to accomplish this (such as learning php or javascript, etc.)... Here's is my problem... I want to make a webpage have this type of layout - (this would be a homepage, broken into components in three columns (there would be a header above, that I left out of the illustration because that would be full width of website and not produce a problem, I don't think)... the left is full height. the center would have three rows and the right would have three rows - offset from the center column) -
http://i.stack.imgur.com/KkEiR.jpg
I can place a div as a wrapper around the entire thing (as I normally need to do when making a three column wide section), and using css... float the left column, left. Add a left margin to the center one (whatever the width of the left div is). And float the right one, right... However, while that does allow me to have three columns across, I cannot have the multiple rows downward in the center, or right column (because it outputs at the height of the largest column for the wrap). In these smaller sections I would like to use some php scripts (I have a php news script and a shoutbox script), so it's not like it's a static picture or text that I could carefully slice, making numerous div wraps and divs within them down the page...
In my research I've seen things such as php includes and requires (I'm not sure if that would allow for the multiple rows in the center and right colums though), I just know it can be used to insert a php script or document into a div. I've also read that isn't the best practice and that Ajax/jquery should be considered for better security. However, I'm still not sure if either of those would allow me to create this layout. I'm sure that joomla or drupal or any number of other CMS probably allow for this, but I want to know the "hands on" way to do it (I've always found that makes configuration, troubleshooting and design much easier and much better quality down the line).
I respectfully ask that answers stay on topic as much as possible, without questions such as, why do you normally do or use this? etc... I would greatly appreciate constructive information on what I CAN do to accomplish this : D... I thank you all again for your time and attention!
Ok, I've found at least one way to accomplish this : D... I still use Divs within Divs (floating them left or right) and placing them within wraps (that can also be floated left and right) to get as many Divs across as I need. Then when I need multiple vertical Divs, I simply create a new *.php file with all the vertical Divs I need, and use the php include_once line to call that *.php file (and all of it's vertical Divs) into the Div on the original page, voila!
My first page (in shorthand) may look something like this -
<div id="content_wrap">
<div id="a"></div> (floated left in css)
<div id="b">
<?php include_once ('vertical_divs.php'); ?>
</div> (floated left with lefthand margin in css)
<div id="c"></div> (floated right in css)
</div>
My vertical_divs.php may look like this -
<div id="vert_a"></div>
<div id="vert_b"></div>
<div id="vert_c"></div>
<div id="vert_d"></div>
<div id="vert_e"></div>
Again, this would pull all of those vertical Divs into Div "B", allowing that column to have multiple vertical Divs without interfering with the Divs to it's left or right.
Related
I have been trying to find the answer online but I might be searching for the wrong keywords.
I am trying to understand how to make 2 columns layout with image being full column width and text being in container (hope I am explaining correctly, see image for visuals). I'm looking for the clean way to do this that would match margins of my other containers.
Would anyone be able to help me understand how to make this work with HTML and CSS.
I tried making two columns and then adding padding to the text column which does not match my other containers.
I'm designing a layout that will serve more like an individual dashboard for registered users. I made it simple, with a basic 2-column grid, one for the sidebar and one for the main content.
Because, like, 80% of the site usage will happen in a separated subsytem, accessed in a chrome-less window (that doesn't matter for the moment), there's not really much content for the right column, the main body.
So I would like to know if it's possible to make the sidebar a bit larger than the current col-md-2 (pairing with col-md-10), but the next level I'm aware of, col-md-3 is too large for a simple sidebar.
Is there a mid-term or an intermediary class for that?
Unfortunately there is not.
However, I've run into this situation a number of times and played with margins to get the size I needed. For example, If you changed col-md-10 to col-md-9 and then did a negative margin on the div inside col-md-2 you could extend your content outside of the grid structure. If done correctly, you wont have any problems. Keep in mind that the margin will need to be adjusted at all media queries. Hope this helps a little.
I am trying to horizontally align 3 columns (Bootstrap) that have variable heights depending on the size of the view port. As seen on the first picture, everything is centered and aligned on large screens.
When the viewport becomes smaller, the paragraph's height changes and the alignment is lost. I would like to keep the headings (blue), paragraphs, and buttons aligned.
My inital thought was to create three rows for the three different types of elements. Unfortunately I will not be able to do that since I want to keep the border in the middle column.
What would be a correct way of keeping alignment of these three columns regardless of the viewport size?
I've never really seen a perfect answer to this, thats not with javascript, I can't remember the exact code, however, last time i did it, i placed the text in a nested section, each boxes text section had the same class, and i assigned a min-height to that class that was long enough that it fitted the longest piece of text in, then place the button underneath that section.
If you put your code in a JSFiddle i can help you more, however,
it should looks something like this, layout wise,
<div class="four columns">
<img></img>
<div class="text"> this will have a min height
</div>
<input>button here</input>
</div>
I hope this helps, i know it doesn't seem very clear, if you have a live version or a JSfiddle i'm more than happy to help further.
as for the text, you're very limited, there is some very good jquery scripts, just look through http://www.unheap.com
and just have general play with text sizes
Assuming they are in an inline containe vertical-align:middle;
I'm working on a MVC application and am having some trouble with the HTML/CSS layout in regards to one of the partials that we have.
The shell of the application contains two columns that expand to be the height of the column with the most content. The left column contains the navigation for the app. The right column is the content area.
I've managed to get this part working appropriately.
Where I'm having issues is that inside for some pages, the content area (right column) needs to be split into two columns. I need both of these columns to dictate the height of the content area, which in turn would dictate the height of the main navigation.
Any input would be incredibly useful! Thanks!
EDIT I got it working, but am not entirely happy with the solution. It requires me to use inline-block, which reads white-space. As a result I used the comment across two lines strategy, but I'm afraid that this would get deleted by somebody while editing/cleaning the project up after the fact.
http://jsfiddle.net/StSmith/RzKJX/
.
I'd imagine that, if you simply added the columns they would automatically fill the space up thus dictating the height of 'content'.
However, if you're floating the columns then the containing element won't pick up their height. In this case you'll need to add, either a cleared element below the columns, or, better add 'clearfix'.
I'm working on my blog which when viewed in > 1020px wide will look like this, using three columns which will load posts in left to right (i.e. place post 1 in the left column, post 2 in the middle, three in the right, then start from the left column again):
This works great, however when the browser reduces down below 1020 the layout will convert to a single column. This is visually easy to achieve by placing the columns underneath each other (looks fine), but this causes the posts to be out of order - the first three posts if there were 9 posts total would actually be post 1, 4 and 7.
I want to maintain the cleanliness of pure CSS managed layout, so I'm wondering if there's a trick to having the above three column layout with floated elements in a single container (rather than three columns).
I've played around a little bit with just floating left and clearing after every three tiles, but that of course just ends up placing every three tiles in a 'row' underneath the tallest tile in the 'row' above.
I know you said you wanted pure CSS but the jQuery library Masonry is specifcally designed for this kind of stuff.
http://masonry.desandro.com/
Otherwise I have not found a good way of achieving this with pure cross browser compatible CSS.