Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

ASP.NET page layout using css

  • 06-10-2009 11:20AM
    #1
    Registered Users, Registered Users 2 Posts: 1,210 ✭✭✭


    Hi guys,

    I'm trying to layout an ASP page using CSS. I'm stuck at the very basics unfortunately :o I have a dropdown which I want to align to the right of the page but nothing is happening, this is what i have:
    body {
    }
    .right
    {
    position:absolute;
    right:0px;
    width:300px;
    background-color:#b0e0e6;
    }
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Products.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp: DropDownList ID="DropDownList1" runat="server" CssClass="right">
    </asp: DropDownList>
    </asp:Content>

    any help appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 1,210 ✭✭✭20goto10


    I knew it was a sily question. I was missing a link to the StyleSheet file in my page:

    <link rel="stylesheet" type="text/css" href="StyleSheet.css" />


  • Registered Users, Registered Users 2 Posts: 1,210 ✭✭✭20goto10


    Ok i have my layout, but now I can't figure out how to stop the controls bunching up on each other when resizing the browser. Any ideas?


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    This is a web design rather than a programming issue, and for the record asp and asp.net are different technologies.


  • Registered Users, Registered Users 2 Posts: 1,210 ✭✭✭20goto10


    OK thanks. Where do I go to ask this question? I am talking about ASP.NET, visual studio 2005 to be precise.


  • Registered Users, Registered Users 2 Posts: 128 ✭✭johnny_rambo


    .right
    {
    position:relative;
    float: right;
    width:300px;
    background-color:#b0e0e6;
    }


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,210 ✭✭✭20goto10


    controls still bunch up...


  • Registered Users, Registered Users 2 Posts: 128 ✭✭johnny_rambo


    20goto10 wrote: »
    controls still bunch up...

    Can you post the code for the controls on the aspx page?


Advertisement