Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2006, 11:27 AM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS + HTML = Vertical Select Menu?

I'm using the following select menu:
Code:
<html>
<body>
<form name="form1">
    <select name="bycategory">
        <option value="" selected="true">- Select a Category -</option>
        <option value="all">Default Category</option>
        <option value="cat1">Category 1</option>
        <option value="cat2">Category 2</option>
    </select>
    <input class="button" type="submit" name="submit" />
</form>
</body>
</html>
And I'm using the following CSS stylesheet:
Code:
/*** SCREEN PROPERTIES BEGIN ***/
/* Other Media Device Properties (show/hide) */
#printheader, #handheldheader, #printcenter, #handheldcenter, #print_subheader, #handheld_subheader {
    display:none;
}

/* Main HTML Properties */
html {
    font-size:62.8%;
    height:100%;
}

body {
    font-family:arial,sans-serif;
    font-size:1.2em;
    margin:0px 0px 0px 2px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    color:#000000;
    background-color:#ffffff;
    height:100%;
}

p {
    display:inline;
}

#breadcrumbs {
    display:inline;
}

/* Wrapper Properties */
#wrapper {
    position:relative;
    width:100%;
    min-height:100%;
}

/* Header Properties */
#screenheader {

}

#seal {
    margin:0px 0px 0px 0px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
}

/* Left Column Properties */
#screenleft {
    position:absolute;
    margin:0px 0px 0px -2px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    width:121px;
    background-color:#660000;
    color:#ffffff;
    height:100%;
    left:2px;
    background-image:url(/newsite/images/gif/bottom.gif);
    background-repeat:no-repeat;
    background-position:left bottom;
}

/* Right Column Properties */
#screenright {/*MASTER RIGHT COLUMN PROPERTY*/
    position:absolute;
    margin-top:-25px;
    margin-right:0px;
    right:0px;
    width:240px;
    height:100%;
    background-image:url(/newsite/images/gif/rightline.gif);
    background-repeat:repeat;
    background-position:right bottom;
}

.screenright_module {
    position:relative;
    margin-right:0px;
    margin-top:0px;
    right:0px;
    width:240px;
}

/* Center Column Properties */
#screen_subheader {
    clear:both;
    font-size:1.3em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#333366;
    width:100%;
    background-image: url(/newsite/images/gif/line.gif);
    background-repeat: no-repeat;
    background-position: left bottom;
}

#content {/* TABULAR CONTENT */
    position:relative;
    margin:-20px 0px 0px 126px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    height:100%;
}

#content_modules {/* MAIN CONTENT */
    position:relative;
    margin:-20px 250px 0px 126px; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    height:100%;
}

/* Footer Properties */
#screenfooter {
    position:absolute;
    margin-left:50%; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    bottom:-140px;
    text-align:center;
}

/* Regular Links Properties */
a:link {
    text-decoration:underline;
    color:#333366;
}

a:visited {
    text-decoration:underline;
    color:#333366;
}

a:active {
    text-decoration:underline;
    color:#333366;
}

a:hover {
    text-decoration:none;
    color:#660000;
}

a {
    text-decoration:underline;
    color:#333366;
}

img {
    border:0px;
}

/* Small Link Properties */
a.small:link {
    font-family:verdana, arial, helvetica, sans-serif;
    font-size:0.8em;
    color:#333366;
    text-decoration:underline;
}

a.small:visited {
    font-family:verdana, arial, helvetica, sans-serif;
    font-size:0.8em;
    color:#333366;
    text-decoration:underline;
}

a.small:active {
    font-family:verdana, arial, helvetica, sans-serif;
    font-size:0.8em;
    color:#333366;
    text-decoration:underline;
}

a.small:hover {
    font-family:verdana, arial, helvetica, sans-serif;
    font-size:0.8em;
    color:#660000;
    text-decoration:none;
}

a.small {
    font-family:verdana, arial, helvetica, sans-serif;
    font-size:0.8em;
    color:#333366;
    text-decoration:underline;
}

/* Tab Link Properties */
a.tabs:link {
    text-decoration:none;
    color:#000033;
}

a.tabs:visited {
    text-decoration:none;
    color:#000033;
}

a.tabs:active {
    text-decoration:none;
    color:#660000;
}

a.tabs:hover {
    text-decoration:none;
    color:#660000;
}

a.tabs {
    text-decoration:none;
    color:#000033;
}

/* White Header Link Properties */
a.white:link {
    text-decoration:underline;
    font-weight:bold;
    color:#ffffff;
}

a.white:visited {
    text-decoration:underline;
    font-weight:bold;
    color:#ffffff;
}

a.white:active {
    text-decoration:underline;
    font-weight:bold;
    color:#ffffff;
}

a.white:hover {
    text-decoration:none;
    font-weight:bold;
    color:#ffffff;
}

a.white {
    text-decoration:underline;
    font-weight:bold;
    color:#ffffff;
}

/* Heading Properties */
h1 {
    display:inline;
    font-size:1.3em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#333366;
}

h2 {
    display:inline;
    font-size:1.2em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#660000;
}

h3 {
    display:inline;
    font-size:1.2em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#000033;
}

h4 {
    display:inline;
    font-size:1.1em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#ff0000;
}

h5 {
    display:inline;
    font-size:1.0em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#000000;
}

h6 {
    display:inline;
    font-size:1.0em;
    font-style:normal;
    font-weight:bold;
    letter-spacing:normal;
    text-decoration:none;
    color:#ffffff;
}

/* List-item Properties */
ol { /* Ordered List (numbers) */
}

li { /* Unordered List (bullets) */
    list-style-type:square;
}

/* Form Properties */
.form {
    display:inline;
    border:collapse;
    font-family:verdana, arial, helvetica, sans-serif;
    color:#000000;
    font-size:.8em;
    font-weight:bold;
    padding:1px;
    vertical-align:top;
}

.textfield_bold {
    font-size:1em;
    font-weight:bold;
}

.textarea {
    font-weight:normal;
    font-size:1em;
}

.select, option {
    font-weight:normal;
    font-size:1em;
}

.filefield {
    padding:0px;
    font-weight:normal;
}

.gobutton,
.imagefield {
    border-width:0px;
}

.button {
    width:auto;
    height:20px;
    padding:0px 0px;
    margin:0; /*'margin-top' 'margin-right' 'margin-bottom' 'margin-left'*/
    text-align:center;
    cursor:pointer;
}

/* Horizontal Rule (line) Properties */
.cranberryline  {
    border-bottom:1px solid #660000;
    height:1px;
    color:#660000;
}

.navyblueline {
    border-bottom:1px solid #000033;
    height:1px;
    color:#000033;
}

.medblueline {
    border-bottom:1px solid #333366;
    height:1px;
    color:#333366;
}

/* Table Properties */
td {
    padding-left:5px;
}

.blackheader { /* Black header */
    font-weight:bold;
    color:#000000;
}

.whiteheader { /* White header */
    font-weight:bold;
    color:#FFFFFF;
}

table.navyblueborder, table.navyblueborder td { /* Navy blue border */
    border-color:#000033;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

table.medblueborder, table.medblueborder td { /* Medium blue border */
    border-color:#333366;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

table.ltblueborder, table.ltblueborder td { /* Light blue border */
    border-color:#9999CC;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

table.iceblueborder, table.iceblueborder td { /* Medium blue border */
    border-color:#CCCCFF;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

table.maroonborder, table.maroonborder td { /* Cranberry border */
    border-color:#660000;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

table.blackborder, table.blackborder td { /* Black border */
    border-color:#000000;
    border-style:solid;
    border-width:1px;
    border-collapse:collapse;
}

/* Div Properties */
.navybluebar { /* Navy blue div bar */
    font-weight:bold;
    color:#000000;
    background-color:#000033;
    text-indent:2px;
}

.medbluebar { /* Medium blue div bar */
    font-weight:bold;
    color:#000000;
    background-color:#333366;
    text-indent:2px;
}

.ltbluebar { /* Light blue div bar */
    font-weight:bold;
    color:#000000;
    background-color:#9999CC;
    text-indent:2px;
}

.icebluebar { /* Ice blue div bar */
    font-weight:bold;
    color:#000000;
    background-color:#CCCCFF;
    text-indent:2px;
}
/*** SCREEN PROPERTIES END ***/
Which is resulting in a vertical select menu for some reason. I've tried commenting out different sections of the CSS stylehseet to find the source, but I've been unable to find it. So if anyone can see what I'm doing wrong, I'd love to get some help. Thanks.

KWilliams
 
Old January 23rd, 2006, 08:57 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Syntax error maybe? On the style sheet you've got

.form {

That's for elements with a form class name, whereas I think you want to apply it to form elements, i.e.:

form {

 
Old January 23rd, 2006, 09:02 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

... it's looks like you've done the same thing with

.select, option {

Where you actually need

select, option {

or

select option {

as option elements are nested inside select in your html.

Finally, I'd put the "diplay:inline;" in this style rule, rather than the form style rule.

These are just hunches :-)






Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Dropdown menu error in IE6 socoolbrewster CSS Cascading Style Sheets 1 March 23rd, 2006 04:09 PM
simple css menu example horseatingweeds BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 December 14th, 2005 07:30 PM
CSS Menu problem twc02 CSS Cascading Style Sheets 24 March 11th, 2005 11:01 AM
how does one get vertical text in HTML? lcsgeek Classic ASP Professional 3 September 9th, 2004 08:47 PM
Vertical Menu Niaz Pro VB 6 2 October 14th, 2003 06:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.