Aligning a link beside a h2 heading - html

Really simple question, how do I force a link to appear inline with a h2 heading?
I have the following code : http://jsfiddle.net/jezzipin/6DpPX/ and I'd just like the 'Back to top' link to appear inline with the 'Social Media' heading but everything I try doesn't seem to work. Even the use of spans.
Any help would be greatly appreciated.
jme1988
N.B. Just to be clear, this is the effect I am after:

Add this css
.b2t_link{
float:right;
margin-left:0;
}
.page_title{
display:inline-block;
vertical-align:top;
}
Demo

Apply the following styles:
.page_title{
font-size:18px;
font-family: Arial,Helvetica,sans-serif;
font-weight:400;
padding-left:16PX;
/*color:#053452; Dark Blue*/
color: #729ABD;
float:left; //Added float
}
.b2t_link{
float: right;
margin-left: 794px; //Reduced margin by width of page-title
font-family: 'FamiliarProBold',Arial,Helvetica,sans-serif;
font-size: 11px;
color: #729ABD;
}
.two_col_textAndImage_text{
width: 720px;
font-size: 11px;
display: block;
float: left;
padding-left: 5px;
padding-right: 5px;
padding-top: 10px;
min-height: 300px;
}
#main-content{
clear:both;
}
Then in the html wrap the image and text in a div with id main-content.
<div id="main-content">
<div class="two_col_textAndImage_text">
<h2 class="item_title_no_image">Social Media Integrations</h2>
<p class="item_text_no_image">
Social Media is fast becoming a channel for advertising, promoting and applying for vacancies. Some organisations have fully embraced this within their recruitment strategies whilst others have not yet or do not wish to adopt this trend. Whatever the view of your own organisation's recruitment channels, ATS2go has been designed to integrate seamlessly with social media. <br/><br/>
Social Media buttons, such as Facebook, Twitter and LinkedIn can be embedded within you vacancy postings enabling visitors to your site to forward a link to their friends and contacts about your vacancies. In addition, ATS2go includes automative "Job Tweets" for your vacancies which include a link back to your recruitment page; people simply click on the link within the Tweet and can then find out more about the role and hopefully submit their application immediately - simple, easy and free! <br/><br/>
</p>
</div>
<div class="two_col_textAndImage_image">
<img / src="https://text-development.ats2go.com/img/content_images/social-media.jpg" width="250px"/>
</div>
</div>
Example: http://jsfiddle.net/6DpPX/8/

You could put the link inside your h2.
http://jsfiddle.net/lollero/49VNH/1
Alternative view: http://jsfiddle.net/lollero/49VNH/1/show
HTML:
<h2 class="page_title">
Social Media
Back to top
</h2>
CSS:
.b2t_link{
float: right;
}

Related

i want my heading to span across width of page

I have the following heading "2015 Annual Architectural Design Convention".
I have it in an h1 tag in my coding. I want it to spread out across the webpage so that it starts on the left and ends on the right (a little padding wouldn't hurt).
I tried doing this by increasing the font but the height becomes too large. I just want it to be around 2 inches in height. I tried span and center tags but they weren't what i was looking for either. Also, I want the text in small caps. Spacing between the letters don't matter as long as it isn't too much.
Any help is greatly appreciated
EDIT: the code didn't show when i first posted. i realized later i did it wrong. Thanks for the down votes though -.- Here's the code:
.heading {
font: 55px;
}
<body class="main">
<h1><span>2015 Annual Architectural Design Convention</span></h1>
<div class="heading"><center>2015 Annual Architectural Design Convention</center></div>
</body>
I tried this later
#heading {
width: 100%;
}
<div id="heading">2015 Annual Architectural Design Convention</div>
Try style .letter-spacing
<h1 style="letter-spacing: 10px;">2015 Annual Architectural Design Convention</h1>
Increase letter spacing distance as per requirement.
It would be worthwhile if you posted some code to show us what you have done. But use this below as a starting point if you wish.
<div id="heading">2015 Annual Architectural Design Convention</div>
#heading {
width: 100%;
}
Here you go
Start using jsfiddle.net
.heading {
font: 55px;
}
h1 {
text-align: center;
}
<h1>2015 Annual Architectural Design Convention</h1>
<div class="heading">
<center>2015 Annual Architectural Design Convention</center>
</div>
Use this:
.wrapper {
margin:0 auto;
width:960px;
max-width:100%;
}
.heading {
width:100%;
margin:0;
padding:40px 0;
}
.heading h1 {
font-size:35pt;
font-family:tahoma;
color:black;
text-align:center;
line-height:35pt;
}
<div class="wrapper">
<div class="heading">
<h1>This is my website</h1>
</div>
</div>

Align picture so it doesnt wrap under nav list.

I'm working on the CSS file for a beginner's Internet Programming course I am taking. The problem is that whenever I made the image in the section into a link, it screwed up the alignment with the rest of the section. I have a Nav List on the side above where this image is, and the Image and Link below it are aligning under the nav bar, while everything else below THAT are staying aligned.
Here is the code:
<p>If you click on the Personal link, you can browse my favorite Halloween pictures,
stories, and films. And if you join my email list, I will keep you up-to-date on
all things Halloween.</p>
<h2>Product of the Week</h2>
<a href="products/cat.html">
<img src="images/cat1.jpg" alt="20'' Deranged Cat">
</a>
<br>
20" Deranged Cat
<h2>My guarantee</h2>
<p>If you aren't completely satisfied with everything you buy from my site, you can return it
for a full refund.
<strong>No questions asked!</strong></p>
Here's the CSS:
/* Section */
section
{
margin: 20px 25px 25px 25px;
}
section h1
{
font-size: 150%;
margin-bottom: .5em;
margin-left: 200px;
}
section h1:first-letter
{
font-size: 250%;
}
section h2
{
font-size: 125%;
margin: .8em 0 .5em 0;
margin-left: 200px;
}
section p
{
margin-bottom: .5em;
margin-left: 200px;
}
/*Formatting for added Product of Week Request in Section 6 Bullet 4*/
/*Changed for Section 7, Bullet 3*/
section img a
{
margin: 300px;
}
section a
{
display: inline;
}
/* Footer */
Please tell me what I'm doing wrong!
Damann23, welcome to SO...to align items you have to get familiar with several properties such as
float:left;
display:inline;
I put your code in a fiddle and although it needs work, this coould give you an idea of how to start. But remember, organizing your code in sections (divs) it's always a smart thing to do instead of running everything in a sheet. That way you can manage these sections individually
DEMO
Not really sure what it is you are trying to do but if you are trying to have them both on the same line you could wrap the text in a span tag and place the image and text in the a tag like so...
check the updated fiddle js fiddle
<a href="products/cat.html">
<img src="images/cat1.jpg" alt="Cat">
<span>20" Deranged Cat</span>
</a>

Placing the button in my page

Actually I'm new to web designing and I'm going to make my own social network and I'm using the amazing layout of Angelsmood.com music social network.
Everything is OK with designing except that I can't place the "Sign Up" button on the right place; it has a lot of margin on its right side. The problem is that there's no margin in my CSS code. Here's my code:
<div id="header_register">
Sign Up
<div>
Artists and their true fans are human angels.
Find them, connect with them and become one of them.
</div>
</div>
And Here's the CSS:
#header_register {
position: relative;
font-size: 12px;
}
#header_register a {
display: block;
height: 30px;
line-height: 30px;
background: ##810101;
color: #fff;
font-weight: bold;
font-size: 14px;
float: left;
text-decoration: none;
border: 1px #508F54 solid;
}
Please help me to fix this.
I made a fiddle and tried to fix your problem the best I could based on the information you gave us.
jsfiddle
Things I did... took your line-height out and moved the link after the div so you didn't have to use it... then I margin: 0 auto to center the <a> tag.
Instead of float: left;
I took it out added a width of the <a> tag so it did not span the width of the screen.
If you need this to function in a different way that I have illustrated ask and I will show you on the fiddle I posted.

I can't get two divs to be beside each other?

I am trying to put two divs beside each other and have it so when you hover over an image some text is displayed. This is my CSS:
.german img, chembond img {
height: 100;
width: 100;
padding: 2px 2px 1px 2px;
}
.german img:hover, chembond img:hover {
border: 1px solid #2e8ece;
border-radius: 10px 10px 10px 10px;
}
.german-content, .chembond-content {
display: none;
}
.german:hover .german-content {
display: block;
float: left;
border: 1px solid;
}
.chembond:hover .chembond-content {
display: block;
float: right;
border: 1px solid;
}
.german-content p, .chembond-content p {
font-size: 15px;
font-weight: normal;
line-height: 30px;
word-spacing: 5px;
color: black;
}
.chembond {
float: right;
}
.german {
float: left;
}
.german, .chembond {
display: inline;
overflow: hidden;
}
And this is my HTML:
<section id="projects-content">
<p>Projects</p>
<section class="german">
<img src="assets/img/german.png" height="60" width="50" />
<section class="german-content">
<p>I started this project because I have seen many students in my German class keep on getting the tenses wrong by putting verbs in the wrong places, missunderstanding past participles etc... so I started this to help students (or anyone) understand the sometimes confusing German tenses. Each tense page consistes of three sub-sections: a question, an answer and a statement. These then in turn include an example and an explanation. If you were to hover over some of the words then a popup box will appear, explaining the use of the word. You can see it here (please bare in mind that this is still a work in progress). If you want to email me a tip about it, or just ask me about it then don't hesitate to contact me.</p>
</section>
</section>
<section class="chembond">
<img src="assets/img/german.png" height="60" width="50" />
<section class="chembond-content">
<p>I started this project because I have seen many students in my German class keep on getting the tenses wrong by putting verbs in the wrong places, missunderstanding past participles etc... so I started this to help students (or anyone) understand the sometimes confusing German tenses. Each tense page consistes of three sub-sections: a question, an answer and a statement. These then in turn include an example and an explanation. If you were to hover over some of the words then a popup box will appear, explaining the use of the word. You can see it here (please bare in mind that this is still a work in progress). If you want to email me a tip about it, or just ask me about it then don't hesitate to contact me.</p>
</section>
</section>
</section>
This is what it currently does: http://www.penguinie.co.uk/#projects
Also, Is there an easier way to do what I'm trying to do? (which is to put both of the images side by side and have them stay side by side when I hover over them and the text appears).
Use display:inline-block; instead of display:block; on the divs.
Using display:inline-block you can still assign width to an element, unlike display:inline. Block level elements will always take a new row.
However, you might notice that there's space in between:
If needed, this can be easily fixed by applying this to the parent element: font-size:0;.
Here's a fiddle about it.
In general, I use #Christian's inline-block solution.
But another possibility is using float: left.
Remember to clear the floating (e.g., with <div style="clear:both"></div>) after your floating elements.

Float:right command removes footer from bottom

On this page: www.incfilms.net/services, my goal is to make that Advertising and Consulting picture move to the right side of that paragraph.
The main page has:
<div class="serviceinfo">I am Not a Communist is now proud to offer a new range of digital video and media services to you and your business. We're calling it INC Pro.
<p>We are able to meet and focus with our clients on finding customizable solutions that are specific to their exact needs and objectives.
<p>We encompass the expertise and capabilities to create professional quality media; offering a number of services ranging from pre
through post production consultation, shooting and capturing, editing, color matching, audio leveling and digital mastering.
<p>Please contact us for a quote or more information at <?php echo $adminemail; ?> or call at <?php echo $phonenum; ?>.
</div>
<!--ADVERTISING AND CONSULTING LOGO -->
<div class="adconsul"><img src="media/advert.png" width="350" height="120"/></div>
And the CSS sheet has:
.serviceinfo {
width: 600px;
text-align: left;
clear: both;
color: white;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
}
.adconsul {
width: 350px;
float: right;
margin: auto;
color: white;
padding-bottom: 100px;
}
I probably shouldnt be using the float right, but is there a way I can get that picture to the right of the paragraph and keep the footer at the bottom? Thank you
Try putting a float: right in the .serviceinfo class
you'll want to use the following after floating divs
<div style="clear:both;"></div>