Dear All,
I am learning how to create my own tab.I have at this site http://183.78.169.54/ct/tab1.html two images. Now I would like to know how to first have text over this image and make it clickable. Secondly how to make the first button to be on top and rest to be bottom of each other.
newbie14
0
Posting Pro
Recommended Answers
Jump to PostYou can create an element with the text in it, and use background-image (in css) to give it the image as background.
Perhaps I don't understand the second question, but if you usediv
's, there will be a return between them. If you usespan
, there won't.
Jump to PostAs a start:
<html> <head> <style> .class_button { background-image:url('your_image.jpg'); } </style> </head> <body> <div class="tab_buttons"> <div class="tab_button">some text</div> <div class="tab_button">another tab button</div> </div> </body> </html>
Jump to PostAdd a width and height:
width:143px; height:31px;
Jump to PostWell, class_button makes less sense IMHO - do you also prepend id's with id_? But no, it doesn't make a difference.
Search for the differences:width:143px;
|width=14px;
Also, 'no-repeat' does nothing on it's own - but you don't need it anyway, just remove it.
Jump to PostOh, you're right. That was a typo, of course, I didn't notice.
What do you mean with "the size is back to the previous small size"? The div gets the width and height you give it, am I missing something? Perhaps a link helps, http://183.78.169.54/ct/tab2.html is …
All 30 Replies
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
twiss
155
Veteran Poster
newbie14
0
Posting Pro
ko ko
97
Practically a Master Poster
newbie14
0
Posting Pro
ko ko
97
Practically a Master Poster
newbie14
0
Posting Pro
ko ko
97
Practically a Master Poster
newbie14
0
Posting Pro
ko ko
97
Practically a Master Poster
newbie14
0
Posting Pro
ko ko
97
Practically a Master Poster
reckey
0
Newbie Poster
newbie14
0
Posting Pro
matricol
-8
Junior Poster in Training
twiss
commented:
Read the thread first, this is not what he meant.
-2
newbie14
0
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.