Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2006



Tip: Looking for answers? Try searching our database.

visual formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aamirghanchi@gmail.com - 28 Nov 2006 21:00 GMT
Hi,
I have following piece of html. It simply shows a blue label top of a
select box.
I need to add a similar select box with a label in the same line as the
one below.
I do not want to use float. Which display type should I be using or is
there something else.
Will appreciate any help.

Thanks

<style>
    .top-label {
        background-color:blue;
        color:white;
        width:100%;
        font-weight:bold;
        text-align:center
    }

</style>

<div style="width:15%;">
    <div class="top-label">Report Type</div>
    <select name="ReportType" style="width:100%">
        <option value="Report1">Report 1</option>
        <option value="Report2">Report 2</option>
    </select>
</div>
Johannes Koch - 28 Nov 2006 21:46 GMT
aamirghanchi@gmail.com schrieb:
> I have following piece of html. It simply shows a blue label top of a
> select box.
[...]
> <div style="width:15%;">
>     <div class="top-label">Report Type</div>
[quoted text clipped - 3 lines]
>     </select>
> </div>

BTW, there is a label element in HTML. You should use it instead of the
top-label div, and bind it to the select via id/for attributes.
Signature

Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
                         (Thomas Tallis, 40-part motet)

aamirghanchi@gmail.com - 28 Nov 2006 23:52 GMT
Thanks Johannes, I just did it.

> aamirghanchi@gmail.com schrieb:
> > I have following piece of html. It simply shows a blue label top of a
[quoted text clipped - 14 lines]
> Spem in alium nunquam habui praeter in te, Deus Israel.
>                           (Thomas Tallis, 40-part motet)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.