Solved

How do I place text beside a block element like H1?

Posted on 2009-07-01
6
150 Views
Last Modified: 2013-07-30
Hello

How do I add text right next to a H1 element? When I try, the text appears below the H1 element as per attachement...

Any help apreciated...

Thanks

Paul
<h2>Company  Data</h2>help

Open in new window

Capture.JPG
0
Comment
Question by:mullproperty
6 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 250 total points
ID: 24752895
Hi mullproperty,
Try this:
<h2 style="float: left">Company  Data</h2>help
0
 

Author Comment

by:mullproperty
ID: 24752908
hey x com, thanks! thats got it all on same line...but how do i now get all elements on the baseline?
Capture.JPG
0
 
LVL 5

Assisted Solution

by:ITGaWD
ITGaWD earned 250 total points
ID: 24758633
try display: inline
with
<div style="display: inline"><h2 style="float: left">Company  Data</h2>help</div>

Or seperatly if it doesn't work.
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 24759923
Hi mullproperty,
>>..how do i now get all elements on the baseline?
Probably you need to override the "help"'s CSS under <h> tag instead of resides outside of "Company Data".
eg:
<h2>Company  Data <font style="font-size:16px">help</font></h2>
0
 
LVL 58

Expert Comment

by:Gary
ID: 39366303
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS Question 9 48
Add animation to your css 12 37
SlickNav Menu Plugin Not appearing on mobile 6 33
Center div containing a script 6 16
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question