How to get blockquote around wrapped photo - html

I just installed a new template on my blog and I cannot for the life of me figure out how to wrap a blockquote around a photo. This is the current blockquote CSS:
.post blockquote {
font-style:italic;
background-color:#ECF1F2;
padding: 20px 20px 20px 20px;
border:1px dotted #31484C;
line-height: 1.8em !important;}
This page shows an example of what I'm attempting to fix and this page shows what I want it to do.
What do I need to add to make this work?

Put the img tag inside the block with your text and apply float: left to the img. That's what floats were made for initially.

I've isolated the relevant CSS and made a simplified example that will hopefully make it clearer for you (I've created utility classes to text alignment, as the initial code as inline style in the HTML, which is not best practice.
Key CSS:
Everything is wrapped in a container div. Then the following
float: left;
clear: left;
margin-bottom: 1em;
margin-right: 1em;
is applied to the book's thumbnail. Since it is only clearing the left side, content on the right side can flow around it.
By applying margin and padding to blockquote, the illusion of the book popping out of the blockquote is created; however, all that is really happening is that the image clears the left side, for the size of the image. After that, content from the right side is allowed to fill the parent container in full, as is the default nature of block-level elements.

Related

HTML5 & CSS3 responsive website design margin issue

Please take a look here, on my code. I am trying to make a responsive web page, but there is weird margin from top and bottom of first article column. I am talking about margin between top navigation and content column and between footer and content column, and I just set 10px margin to right column like below.
.content {
width: 69%;
float: left;
margin:0;
padding:0 10px 0 0;
}
I am new to web designing, and I don't know what wrong I am doing here. Please help me
Using
.topcontent{
display: inline-block;
}
should solve your problem.
You're experiencing the way margins collapse together. Set the top-margin on the H2 tag to 0, and the bottom-margin on the last paragraph to 0. Then to restore the white space, add top and bottom padding to the article element.
More info about margin collapse here:
https://developer.mozilla.org/en-US/docs/Web/CSS/margin_collapsing

half page full width Styling CSS

I am currently working on this website: http://mdftanzania.com. I am using Wordpress and headway101. I want to have a full width green background color that applies to the begin part of the page: About Us and Services. I add a div class to the part of the page where the green background has to be. I tried to style the div class to a full width green background, this didn't work out and at the moment only a part is styled now (see the website: http://mdftanzania.com).
I understand that there is another solutions, that is creating a container or widget above the container for the content, where I place the first part of the page text in. The problem with this is that it is confusing for my client where to edit the text in the page. The simplicity of Wordpress goes basically away then. Because of that, I am looking for a solution with CSS styling, so the client is only dealing with the 's.
Does anybody has a solution for this?
Since you have predetermined a padding to the content block, it is obviously affecting all the child elements that are contained in it, including the div with green background, which means that you should either remove that padding and apply it only to specific elements, or apply this simple CSS workaround to your div:
{
margin: 0 -25px;
padding: 0 25px;
}
This makes it, in your words, "full width" and applies a padding to its content.
You have this rule set in your css:
.block-type-content {
padding-left: 25px;
padding-right: 25px;
padding-top: 120px;
}
So children of this container, even though they may have a width of 100%, have to obey this padding of their parent. That's why you don't get a full width green bar. You might try negative margin-left and right to expand your green bar:
.color {
margin: 0 -25px;
padding: 0 25px;
}
At least in Firefox/Mac, this solves your issue.

How do I properly align this title in Bootstrap/CSS?

I'm beginning to mock-up a WordPress theme based on Twitter's Bootstrap framework.
Could someone validate the code I have so far is kosher?
More specifically, the header...
I have my name and sub-head beside an avatar image.
I want the text to appear vertically in the middle of the image. This works successfully when the page is wide enough (screengrab: imgur.com/YCpSm). But, when I reduce the browser width and responsive design kicks in, the text moves up (screengrab: imgur.com/K4Vyj).
How do I ensure the text stays in the vertical center of the image?
Thanks.
--
Code: http://jsfiddle.net/robertandrews/jP4nT/ (contains standard bootstrap.css, standard bootstrap-responsive.css and custom CSS in one)
Page: http://jsfiddle.net/robertandrews/jP4nT/embedded/result/
You could go with floating elements instead of absolute positioning:
http://jsfiddle.net/jP4nT/1/
I also wouldn't place the <h1> tag within the <p>, but that's probably fine though.
This might be simpler: http://jsfiddle.net/6FMDR/
No extra html tags needed
Less css
CSS:
.myheader {
padding:15px 0 20px;
display:block;
}
.myheader img {
float: left;
padding:0 15px 10px 0;
}
.myheader h1 {
margin-top: 10px;
}

Wrapping text around image

I am trying to get text wrap around the image in the page below. Although the image is floated to the left the text doesn't seem to wrap around.
http://goo.gl/SskvJ
I would appreciate any help
Your .region class has a float:left rule that should be removed. Then you'd also need to remove the clear:both rule on the h2 element. Then you'd want to add a float:left rule to the image on the page.
I think I found a solution. It worked fine with me.
What I've made was creating a div called content and I placed inside an img and also another div that contains text.
Have a look at here http://jsfiddle.net/Apfyv/
Hope it helps!
You have both image and text in a div and the are both floated left ... this is fine - but the div elements dont have a width specified - so they are taking up 100% (block element) - if you assign the divs a width it display to the right of the image
Seems like the text is not wrapping around the image because the text and the graphic are both in two separate DIV tags, you should merge them.
Add a style
.region > img {
float: left;
}
And add display: inline-block to #page_product #overview h2
#page_product #overview h2 {
margin: 0 0 1.5em;
font-style: italic;
font-weight: bold;
font-size: 1.2em;
line-height: 1.429;
display: inline-block;
}

CSS styling problems

I'm a beginner and I have been battling to get this site to work as desired. Thanks to advice on this forum to include an IE7 specific style sheet I am almost there, but with a couple of minor issues remaining. Some of the styles just won't work and I'm starting to despair! I have three issues and if anyone can shed some light on these I'd be super happy!
Across all browsers (both stylesheets), 'main p' text padding on the right is only appearing on pages 'studios.htm' and 'contactus.htm' - I have no idea why and have tried playing around with all the styles without success.
On the 'location.htm' page I am unable to position the footer "behind" the Google Map, like the picture rows are positioned on the other pages. I have tried changing margins, padding and z-index, but nothing seems to change it - I can manage to position the footer in the right place but the Google Map stays "behind" it so that the bottom part of it can't be seen.
On IE7 ONLY: CSS text formatting doesn't seem to change the font size at all. As a result the text is too large and on pages 'studios' and 'thingstodo', this results in the very bottom part of the text to go down too low and hide behind images. If the text was the right
The site is here: http://bit.ly/gaAthc
Main CSS: http://jsfiddle.net/ykbhd/
IE7 specific CSS: http://jsfiddle.net/bdwrY/
Thanks in advance!
1) The reason this appears correct sometimes is simply how the text breaks in your paragraphs. Your p tags are taking the full width of your main div, so putting right padding isn't doing to help. Instead, just put some padding on your image.
Line 190:
#target2
{
float: right;
padding-left: 5px;
}
2) You can use negative margins the same way you do for the picture rows.
Line 178:
#googlemap
{
margin-bottom: -130px;
}
3) Remove margin-bottom: -10px; from this rule:
#container #main #rotxt
{
font-family: Georgia,"Times New Roman",Times,serif;
font-size: 0.8em;
margin-top: 35px;
padding-left: 1px;
}
Update
For the Google map footer issue in IE7, try adding this rule to a IE7 stylesheet (see here for info on conditional comments):
#footer
{
z-index: -1;
position: relative;
}
Add overflow: hidden; to #main p