Results 1 to 6 of 6

Thread: span width in HTML Css

  1. #1
    Join Date
    Dec 2009
    Posts
    204

    span width in HTML Css

    I am creating a simple page and studied a lot about the controls in the HTML.But not getting the actual concept to use the Span control in HTML and how much it relates with CSS and padding.

    Please tell me and guide me,how can I manage the HTML span control in pages and CSS also.What the actual purpose of this control.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    span width in HTML Css

    The SPAN tag in the web development environment,is very useful and popular tags within the HTML language,facilitate you to include the desired html code and required elements for your web pages Like - Highlighting text,applying a background image and mouse over events.

    The effective settings for your web page elements is contained within the following tag

    <SPAN>
    Create the mouse over event.
    Highlighting text ...
    </SPAN>


    NOTE : The setting can be applied on mouse over events.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Span tag - syntax

    Code:
    <SPAN Attribute=value>
    ///....Tags and other text coded here.....!!!!
    </SPAN>
    And the Attributes are described here :

    ID = string
    CLASS = string
    STYLE = string
    TITLE = string
    LANG = Language (i.e. EN- English)
    DIR = ltr|rtl; specifies text reads procedure left to right or vice versa.
    SCRIPTING EVENTS = string

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Pictures changed on mouseover

    Suppose,I am creating a page.I tagged an image on the page and whenever mouse is pointing on the image,the image gets change.You can construct the code but need to be the knowledge
    of events in java script.

    The code is given below which will show you the same effect -

    Code:
    <SPAN onMouseOver="document.pic1.src='image2.gif'" 
                  onMouseOut="document.pic1.src='image1.gif'">
       <img src="image1.gif" height="40" width="100" name="pic1">
    </SPAN>

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Span with the CSS

    Span with the CSS

    The span tag can be structured with some contents and you need to change the display behavior of the contents which is contained within the SPAN control
    can be changed successfully.

    Suppose you have created a list using HTML control within the SPAN control
    and need to change the display behavior of both tags then you can do it using
    CSS.

    <li><span></span> Both will come.</li>
    <li><span>AND</span> He is the first.</li>
    <li><span>OR</span> She is the first.</li>

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Changing the Display using CSS

    The above example is shown by the member and you can use the above code to change the behavior of display property of the text by CSS controls.

    Now use CSS control and chnage the display behavior of the contents.

    Code:
    <style type="text/css">
    ul 
    {
            list-style-type: none;
            padding-left: 0px;
    }
    
    span 
    {
      display: inline-block;
      width: 50px;
    
    }
    </style>
    After combination of both code within the HTML file,you can see the display
    difference of contents for both tags.

Similar Threads

  1. Want to span wallpaper on two screens
    By Tallin in forum Customize Desktop
    Replies: 4
    Last Post: 10-11-2010, 06:06 PM
  2. HTML page table width not working in Firefox
    By Ground 0 in forum Software Development
    Replies: 4
    Last Post: 23-08-2010, 06:56 PM
  3. How to span disk in linux
    By TechGate in forum Operating Systems
    Replies: 4
    Last Post: 11-03-2010, 09:37 PM
  4. How to return to online for a span
    By ASHER in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 07:15 PM
  5. Firefox ignores the style width attribute in the SPAN tag?
    By Jarvis in forum Software Development
    Replies: 3
    Last Post: 25-10-2008, 03:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,302,867.91630 seconds with 17 queries