Showing posts with label code - horizontal line. Show all posts
Showing posts with label code - horizontal line. Show all posts

Tuesday, 28 May 2013

Adding Separators (Vertical Lines) Between Pages Links in Blogger Dynamic View | Southern Speakers v3.0

Adding Separators (Vertical Lines) Between Pages Links in Blogger Dynamic View | Southern Speakers v3.0









Before




After

The header bar in a Dynamic View template could accommodate several horizontal Pages links as well as external links (before resorting to a drop-down menu when the number of links increases). A couple of users have been wondering if a separator line could be placed in between the links. The answer is yes, and that's what this tutorial is going to be about.


Go to Dashboard --> Template --> Customize --> Advanced --> Add CSS --> paste the following code --> Press enter after the last character of the last line } --> Apply to Blog.



?




1


2


3


4


5


6


7


8


9



#header #pages:before{


border-left: 0px !important;


}


#header .tabs li, .ss{


margin-left:0px !important;


padding-left: 10px !important;


padding-right: 5px !important;


border-left: 1px solid white;


}








Extras

1) To remove the left-most vertical line (to the left of your first link), add the following additional code to your 'Add CSS' box:



?




1


2


3



#header .tabs li:first-child{


border-left: 0px !important;


}





2) To add an extra vertical line to the right of your last link, add the following additional code to your 'Add CSS' box:



?




1


2


3


4



#header .tabs li:last-child{


padding-right:10px !important;


border-right: 1px solid white;


}










Sunday, 26 May 2013

html: making lines

html: making lines

html tips: making lines
    Making dividing lines to section off areas of your pages is easy to do. This page gives examples of code above the line created by that code.
basic lines
The basic tags, and their modifications, are given below. In each case, the new code is shown in red, and the line beneath it is an example of what that code does.
    <hr>

    <hr noshade>


line thickness
The default line thickness is 2; you can see that in the examples above. Below are some different values for the line thickness.
    <hr size=1>

    <hr noshade size=1>

    <hr size=3>

    <hr noshade size=3>

    <hr noshade size=7>

    <hr size=7>

line width
The "width" tag refers to the left to right size. Default is 100% across the screen, meaning that if you don't specify the width, as in the examples above, the line spans the entire screen. The examples below show the results of specifying the width. On most browsers, the line will be centered.
    <hr noshade size=1 width=33>

    <hr noshade size=1 width=300>

You can also specify by percent. The percent refers to the percent of the browser screen size; 50% means half the width of the screen, no matter what size it is. The size of the lines below will change if you make your browsers screen wider or narrower; notice, though, that the examples above do not change.
    <hr noshade size=1 width="33%">

    <hr noshade size=4 width="50%">

    <hr size=4 width="50%">

alignment
The "align" tag works on most browsers, and will put the line on either the right or left side of the screen.
    <hr noshade size=4 width="50%" align=left>

    <hr noshade size=4 width="50%" align=right>

    <hr size=8 width="50%" align=left>

    <hr size=8 width="50%" align=right>

comparing widths - percent vs. numbers
Notice the difference between these two examples. In one, the width is given as a number value: 200, which is roughly a third of a full-sized, 15 inch monitor. The second is given as percent: 33%. If you adjust your browser window to make it narrower or wider, you can see that the first example does not change, whereas the second does change.
    <hr size=3 width=200 align=left>

    <hr size=3 width="33%" align=left>

color, shape
As far as I know, there is no way to specify the color of an HR line. Furthermore, the color of these lines on your screen now depends on the browser, the operating system, and the monitor you're using. On my Macintosh's 256 color screen, using Netscape 3, the unshaded lines are black, and the edges are squared. On my Compaq's million color monitor, using Netscape 3 for Windows 95, the unshaded lines are drab olive or grey, and the edges are rounded if the size is over 5.
However, if you use a background image, and you specify a contrasting background color, the lines will (with certain setups, but not all) take on the color you have specified in the background. (I've seen this work on a Japanese Windows 95 version of Netscape 3 on a 16-bit color Compaq monitor.)


back to
HTML Tips Articles Index
Bill Pellowe
e-mail: billp@gol.com

Horizontal Lines - HTML Tutorials for the Complete Idiot

Horizontal Lines - HTML Tutorials for the Complete Idiot

Horizontal Lines!

HTML Tutorials
By Jeffrey J. Walters

      Making a horizontal rule, or line as most of us refer to it, is easier than most people think. It's one small, short, and simple command; <hr>. Here's what is looks like in it's simplest form.

And, here's the amazing code that made it.
<hr>
       Pretty simple as you can see. That's all there is to it. I have used the <hr> command all over these tutorials, so this tutorial may get a bit confusing at times. The next line is just a section break.

Horizontal Ruler Attributes:

       There are a couple of attributes or options to the <hr> command. Here's it is in summary.
<hr attribute1=".." attribute2="..">
Inserts a horizontal line.
Attributes:
  1. size=".." ; the thickness of the line.
  2. color=".." ; line color, Internet Explorer only.
  3. width=".." ; the length of the line.
  4. align=".." ; alignment of line: RIGHT, LEFT, or CENTER.
  5. noshade ; make a solid line.
       The SIZE is measured in pixels. Try using 3, 5, or maybe 10 to see what thickness' you like. The COLOR attribute will only work with the Internet Explorer browser so I wouldn't use it unless absolutely necessary. The COLOR should be in hexadecimal form.
I use WIDTH attribute much more than any of the others. The WIDTH can be entered in pixels or as a percentage of the browser's window width. Here are some examples with the WIDTH attribute used.

And, here's the code.
<hr width="300">

And, here's the code.
<hr width="75%">
       I really like to use the percentages, because it makes you web page seem to fit to the viewers browser. To see what I mean, increase or decrease the width of your browser window by clicking the edge of the window and dragging it to the right or left. Watch how the line created with a percentage adjusts to the width of the browser window.
The ALIGN attribute is also very useful. It allows you to justify your line to the RIGHT , LEFT, or CENTER. For most browser's, CENTER is the default and is not needed in the <hr> command. NOSHADE is the last attribute and it make the line solid instead of having a shading effect.

More examples:

       Some more examples are shown below. The HTML code for each is shown indented and in bold. I hope this helps.

<hr width="200" align="left">

<hr width="25%" align="right">

<hr size="10">

<hr size="10" noshade>

Link to this Tutorial!

Did you find this tutorial helpful? If so, please help me to share it with others by linking to it. Just place the HTML code below onto your own Web page to create a link to this tutorial.

Thursday, 9 August 2012

redline HTML that works - Tryit Editor v1.5

Tryit Editor v1.5

<!DOCTYPE html>
<html>
<body>

<p>With HTML:</p>
<hr noshade="noshade" />

<p>With CSS:</p>
<hr style="height:2px;border-width:0;color:gray;background-color:gray" />

</body>
</html>

With HTML:

With CSS:

So, You Want An HR Line, Huh?

So, You Want An HR Line, Huh?

Use these to jump around or read it all...

[The Basic Line]
[Changing The Width]
[Changing The Height]
[Sending It To The Left Or Right]
[No Shading, Please!]
[How About Some Color?]
     I want to shake the hand of whoever came up with this <HR> line. It is a great, and simple, way to break up your page. I use them to death. Here I'll try to get into the more subtle sections of the <HR> line.

The Basic Line

     You probably already know that you can place a line simply by typing <HR> on the page. "HR" stands for horizontal reference, by the way. It makes a nice line with a little bit of shading all the way across the screen. Plus it needs no end command. And it's centered. Coolness.

     But all those lines looking the same tends to get dull. Let's change it a bit.

Changing The Width

     You change the width of the line by adding a subcommand to the <HR>. I do this with all my lines. I think the line going all the way across the page is a bit much. I only have mine go 60 or 80% of the page. See the lines at the very top that get thinner to wider then wider to thinner? I just added different percentages to a series of HR commands. Here's the format:

<HR WIDTH="60%">

     Notice it's just an HR command with WIDTH="--%" added. You can set the width to any percentage you want. There's no need to stay with round numbers. If you really want a line that only goes 17% -- fine. Just remember to include the percentage sign (it's over the number 5 on your keyboard).


Changing The Height

     How's about a thicker line? Like these:






Here's the format:


<HR SIZE="6">

     Think of the size command as equal to the "H" commands in that there are six, numbered 1 through 6, with six being the widest.
     You might also notice that the lines are only 60% width. I just used both commands inside the same <HR> command, nothing to it.


Sending It To The Left Or Right

     How about this...




     You can probably guess how I did that. I added ALIGN="--" inside of the command. Here's what made the four lines above:


<HR WIDTH="60%" ALIGN="LEFT">
<HR WIDTH="60%" ALIGN="RIGHT">
<HR WIDTH="60%" ALIGN="LEFT">
<HR WIDTH="60%" ALIGN="RIGHT">

     You can also state ALIGN="center", but that's a bit of overkill as the line centers for you anyway. Notice, also, that I used the width command in there.


No Shading, Please!

     Here's what it looks like:

     And here's what does it:

<HR WIDTH="60%" NOSHADE>

     I'm not a super fan of the command, but to each his or her own.


How About Some Color?

     No problem. Dig this:



     There are three HR lines set to the three colors of Mardi Gras (I live in New Orleans). It's the "COLOR=" attribute that does the trick. Here's the code. Notice that I have also set the HR lines to only span 60%.

<HR COLOR="yellow" WIDTH="60%">
<HR COLOR="purple" WIDTH="60%">
<HR COLOR="green" WIDTH="60%">

     Nothing to it.

Enjoy!


[The Basic Line]
[Changing The Width]
[Changing The Height]
[Sending It To The Left Or Right]
[No Shading, Please!]
[How About Some Color?]
  • said on May 22, 2012 at 11:22 am

    How can I get spacing on the top and under the rule line?
  • said on January 20, 2011 at 1:09 am

    Thanks for the tutorial. I'm having problems with it going across the entire webpage. It seems to start about a cm away from the left side. E-mail me if you can help. Thanks
  • said on December 21, 2010 at 5:32 pm

    Nice tutorial, im still new to this but it was quite helpful. I was wondering if there was any chance of chainging the height at which the line appears in the "writing space". When im using it seems to be bottom of the line im working on, i mean something like this _ and i want it at this height ------ or top. Im not sure if you get what im saying. Thanks in advance whatname

the hr tag, the horizontal rule

the hr tag, the horizontal rule

the hr tag, the horizontal rule

the horizontal rule, or hr tag is a good way to divide the content of your webpage.
on this page you will find examples of the hr tag and other methods of seperating the content of your html document.

hr example 1.
<hr>

in the example above we see that using the hr tag produces a line across the screen, the hr tag is a block level element which means it starts on a new line, so there's no need to include a <br> tag beforehand

in this next example we will look at controling the size of the hr tag

hr example 2. (size)

<hr size="2" width="50%">
<hr size="20" width="50">
<hr size="20" width="50%">

the hr above looks like an outline because your browser gives it a 3d appearance, here it is again without the 3d look

<hr size="20" width="50%" noshade>

we can align a hr tag left right and center

hr example (align)

<hr align="left" size="3" width="50%" noshade>
<hr align="center" size="3" width="50%" noshade>
<hr align="right" size="3" width="50%" noshade>


we can color it in
<hr color="#0099FF">

which brings us to the hr tag and browser compatibility, this does not work in netscape but we can cheat in one or two ways
the first way we can use a cross browser line to divide the content of a web page is to use an image measuring 1 pixel x 1 pixel and stretch it!

<center>
<img height="3" width="50%" src="blue.gif">
</center>

another way to cheat is to create horizontal lines using html tables, this assumes that you have already read the html tables tutorial

html tutorial

HTML hr tag

HTML hr tag


Example

Two paragraphs divided by a horizontal line:
This is some text.



This is some text.

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari
The

tag is supported in all major browsers.

Definition and Usage

The

tag creates a horizontal line in an HTML page.
The

element can be used to separate content in an HTML page.

Differences Between HTML and XHTML

In HTML, the

tag has no end tag.
In XHTML, the

tag must be properly closed, like this:

.

Optional Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute Value Description DTD
align left
center
right
Deprecated. Use styles instead.
Specifies the alignment of a

element
TF
noshade noshade Deprecated. Use styles instead.
Specifies that a

element should render in one solid color (noshaded), instead of a shaded color
TF
size pixels Deprecated. Use styles instead.
Specifies the height of a

element
TF
width pixels
%
Deprecated. Use styles instead.
Specifies the width of a

element
TF


Standard Attributes

The

tag supports the following standard attributes:
Attribute Value Description DTD
class classname Specifies a classname for an element STF
id id Specifies a unique id for an element STF
style style_definition Specifies an inline style for an element STF
title text Specifies extra information about an element STF
More information about Standard Attributes.

Event Attributes

The

tag supports the following event attributes:
Attribute Value Description DTD
onclick script Script to be run on a mouse click STF
ondblclick script Script to be run on a mouse double-click STF
onmousedown script Script to be run when mouse button is pressed STF
onmousemove script Script to be run when mouse pointer moves STF
onmouseout script Script to be run when mouse pointer moves out of an element STF
onmouseover script Script to be run when mouse pointer moves over an element STF
onmouseup script Script to be run when mouse button is released STF
onkeydown script Script to be run when a key is pressed STF
onkeypress script Script to be run when a key is pressed and released STF
onkeyup script Script to be run when a key is released STF
More information about Event Attributes.