Solved

How can I expand text with explaination

Posted on 2016-11-10
5
30 Views
Last Modified: 2016-11-11
I want to create a homepage. I want to be able to have text that appears like this but when a user hovers over it the text expands (and becomes bigger on where-ever their pointer is at). Is there anyway I could do this?
0
Comment
Question by:Jasmine Ikhreishi
  • 2
  • 2
5 Comments
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41882397
You can do this with a CSS style
<!doctype html>
<html>
<head>
<style type="text/css">
p {
  font-size: 12px;
}
p:hover {
  font-size: 20px;
}
</style>
</head>
<body>
<p>This is the text</p>
</body>
</html>

Open in new window

0
 
LVL 1

Author Comment

by:Jasmine Ikhreishi
ID: 41882399
Also I have like this in a bootstrap blog page
    <h4><small>RECENT POSTS</small></h4>
      <hr>
      <h2>Officially Blogging</h2>
      <h5><span class="glyphicon glyphicon-time"></span> Post by John Doe, Sep 24, 2015.</h5>
      <h5><span class="label label-success">Lorem</span></h5><br>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
      <hr>

Open in new window

Is there a way I could put a background image just for this block?
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 41882514
give the h4 a class (say bgimage)
[code]
<style type="text/css">
h4.bgimage {
  background: url(path/to/image.jpg) no-repeat;
}
</style>
...
<h4 class="bgimage">
...
</h4>

Open in new window

[/code]
If you want a sample suggest you post another question and put your source code and image in it. Then post link here.
0
 
LVL 1

Author Comment

by:Jasmine Ikhreishi
ID: 41883716
Okay thank youu
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now