bootstrap nav vs div class: nav

4 views
Skip to first unread message

fugee ohu

unread,
Dec 22, 2019, 6:08:09 PM12/22/19
to Ruby on Rails: Talk
Documentation says to use:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
But in my views I've been using
<div class = "navbar navbar-default navbar-static-top">
The code is a little different, I have to try it out, but the question is the same Is applying the class to the div the same as not using the div for bootstrap purposes

Ariel Juodziukynas

unread,
Dec 22, 2019, 6:12:50 PM12/22/19
to rubyonra...@googlegroups.com
The "nav" tag provides more meaning, I guess bootstrap just checks the class "navbar" so it doesn't care if you used a div or a nav, but in terms of semantics, a nav tag if better for a navigation bar as the name suggests.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f79a4675-30bd-4527-872f-f65badb78d5b%40googlegroups.com.

fugee ohu

unread,
Dec 22, 2019, 7:46:13 PM12/22/19
to Ruby on Rails: Talk


On Sunday, December 22, 2019 at 6:12:50 PM UTC-5, Ariel Juodziukynas wrote:
The "nav" tag provides more meaning, I guess bootstrap just checks the class "navbar" so it doesn't care if you used a div or a nav, but in terms of semantics, a nav tag if better for a navigation bar as the name suggests.

El dom., 22 dic. 2019 a las 20:08, fugee ohu (<fuge...@gmail.com>) escribió:
Documentation says to use:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
But in my views I've been using
<div class = "navbar navbar-default navbar-static-top">
The code is a little different, I have to try it out, but the question is the same Is applying the class to the div the same as not using the div for bootstrap purposes

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonra...@googlegroups.com.

Thanks
Reply all
Reply to author
Forward
0 new messages