473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

visual formatting

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>

Nov 28 '06 #1
2 1377
aa**********@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>
<select name="ReportType" style="width:100%">
<option value="Report1">Report 1</option>
<option value="Report2">Report 2</option>
</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.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Nov 28 '06 #2
Thanks Johannes, I just did it.

Johannes Koch wrote:
aa**********@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>
<select name="ReportType" style="width:100%">
<option value="Report1">Report 1</option>
<option value="Report2">Report 2</option>
</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.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Nov 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as...
1
by: chris mancini | last post by:
I have recently installed Visual Studio .Net 2003 and have noticed that there are problems with formatting in the HTML code page. If I format the HTML the way I want and navigate back to design...
1
by: Craig Hunt | last post by:
Am I missing something here? Quite frequently, I'll write an aspx document taking care to format the HTML so that I and others on my team can read it. <sarcasm>We kind of like to know what's...
3
by: ssb | last post by:
Hello, I have multiple forms in my access application. I want all the forms to have consistent formatting for fields appearing on the forms (i.e. same background color, fonts, font color etc). ...
1
by: Paul M | last post by:
Hi folks, I've got a page that contains the basic formatting that I need for pretty much all of my systems pages. It's compiled into it's DLL, distributed to my application's \bin folder and VS...
8
by: Jacob Crossley | last post by:
Preface: Not to sound mean or arrogant, but please don't answer this question unless you have a specific and tested answer. I'm saying this only because I posted the same quesion earlier and got...
6
by: Marty U. | last post by:
I know this topic has been beat to death. However, I was sitting here trying to figure out what Microsoft Does when they develop an ASP.net for WYSIWYG functionality. Visual Studio's sucks to be...
3
by: michael.lang | last post by:
I am using PostBuild events in a C# project to run some tasks, but only when in release configuration mode. The build events run perfectly as expected when run. The problem comes when I save the...
13
by: sck10 | last post by:
Hello, I am trying to find the option VS2K5 that will automatically change HtmlMeta hm=new HtmlMeta(); or HtmlMeta hm = new HtmlMeta(); to HtmlMeta hm = new HtmlMeta(); What I would...
0
by: STP.NET | last post by:
Hello, Is there a way to configure Visual Studio 2005 to reformat the C# source code automatically when a file opens? I worked with several dozens of C# developers at work, open-source...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.